Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Remove programming GCMC_VM_FB_LOCATION* on gfxhub_v3_0_3 in VF

[Why]
GCMC_VM related registers should be programmed by PSP on host side.
L1 and RLCG will block these regisers on VF.

[How]
Remove programming GCMC_VM_FB_LOCATION_BASE/TOP on gfxhub_v3_0_3 under SRIOV VF.

Signed-off-by: Yifan Zha <Yifan.Zha@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yifan Zha and committed by
Alex Deucher
17a37fa1 f3416dc8

-12
-12
drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c
··· 357 357 358 358 static int gfxhub_v3_0_3_gart_enable(struct amdgpu_device *adev) 359 359 { 360 - if (amdgpu_sriov_vf(adev)) { 361 - /* 362 - * GCMC_VM_FB_LOCATION_BASE/TOP is NULL for VF, becuase they are 363 - * VF copy registers so vbios post doesn't program them, for 364 - * SRIOV driver need to program them 365 - */ 366 - WREG32_SOC15(GC, 0, regGCMC_VM_FB_LOCATION_BASE, 367 - adev->gmc.vram_start >> 24); 368 - WREG32_SOC15(GC, 0, regGCMC_VM_FB_LOCATION_TOP, 369 - adev->gmc.vram_end >> 24); 370 - } 371 - 372 360 /* GART Enable. */ 373 361 gfxhub_v3_0_3_init_gart_aperture_regs(adev); 374 362 gfxhub_v3_0_3_init_system_aperture_regs(adev);