drm/amdgpu/gmc11: disable AGP on GC 11.5
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu/gmc11: disable AGP on GC 11.5
AGP aperture is deprecated and no longer functional.
v2: fix typo (Alex)
v3: just skip the agp setup call
--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +2 -1
@@ -689,7 +689,8 @@ static void gmc_v11_0_vram_gtt_location(struct amdgpu_device *adev,amdgpu_gmc_vram_location (adev, &adev->gmc, base);amdgpu_gmc_gart_location (adev, mc); -amdgpu_gmc_agp_location (adev, mc); +if (amdgpu_ip_version (adev,GC_HWIP ,0 ) <IP_VERSION (11 ,5 ,0 )) +amdgpu_gmc_agp_location (adev, mc);/* base offset of vram pages */ if (amdgpu_sriov_vf (adev))
Signature · 1 line
2.41.0
[AMD Official Use Only - General]
Hi Alex,
Does driver also need to disable AGP aperture in hardware side ? (Set register GCMC_VM_AGP_BOT/TOP to make AGP address range invalid). The current changes only make the GPU not use AGP range addresses, but the hardware unit of AGP's aperture is still working. There seems to be some hidden danger here, if the generates GPU an illegal address, then GPU can access it.
Ref commit: 81c274c473a2 drm/amdgpu: disable agp for sriov
Best Regards,
Kevin
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, September 19, 2023 10:38 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/gmc11: disable AGP on GC 11.5
AGP aperture is deprecated and no longer functional.
v2: fix typo (Alex)
v3: just skip the agp setup call
--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +2 -1
@@ -689,7 +689,8 @@ static void gmc_v11_0_vram_gtt_location(struct amdgpu_device *adev,amdgpu_gmc_vram_location (adev, &adev->gmc, base);amdgpu_gmc_gart_location (adev, mc); -amdgpu_gmc_agp_location (adev, mc); +if (amdgpu_ip_version (adev,GC_HWIP ,0 ) <IP_VERSION (11 ,5 ,0 )) +amdgpu_gmc_agp_location (adev, mc);/* base offset of vram pages */ if (amdgpu_sriov_vf (adev))
--
2.41.0