]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: Avoid fetching vram vendor information
authorLijo Lazar <lijo.lazar@amd.com>
Sat, 20 Jan 2024 08:02:51 +0000 (13:32 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Jan 2024 22:13:28 +0000 (17:13 -0500)
For GFX 9.4.3 APUs, the current method of fetching vram vendor
information is not reliable. Avoid fetching the information.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index 9bff72356a3716a242de0091a47ab9ad8dc960d2..a3a11538207b3c3f670d460841a729100c8428fb 100644 (file)
@@ -1952,7 +1952,8 @@ static void gmc_v9_4_3_init_vram_info(struct amdgpu_device *adev)
        static const u32 regBIF_BIOS_SCRATCH_4 = 0x50;
        u32 vram_info;
 
-       if (!amdgpu_sriov_vf(adev)) {
+       /* Only for dGPU, vendor informaton is reliable */
+       if (!amdgpu_sriov_vf(adev) && !(adev->flags & AMD_IS_APU)) {
                vram_info = RREG32(regBIF_BIOS_SCRATCH_4);
                adev->gmc.vram_vendor = vram_info & 0xF;
        }