drm/amdgpu: disable gfxoff with the compute workload on gfx12
Subsystems (3)
PATCH 1/1 drm/amdgpu: disable gfxoff with the compute workload on gfx12
Disable gfxoff with the compute workload on gfx12. This is a workaround for the opencl test failure.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +4 -2
@@ -715,8 +715,10 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,void amdgpu_amdkfd_set_compute_idle (struct amdgpu_device *adev,bool idle) {enum amd_powergating_state state = idle ?AMD_PG_STATE_GATE :AMD_PG_STATE_UNGATE ; -if (IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==11 && - ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) <=64 )) { +if ((IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==11 && + ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) <=64 )) || + (IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==12 && + ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) >0x6C ))) {pr_debug ("GFXOFF is %s\n" , idle ?"enabled" :"disabled" );amdgpu_gfx_off_ctrl (adev, idle); } else if ((IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 9) &&
Signature · 1 line
2.34.1
Quoted 14 lines · Kenneth Feng
Disable gfxoff with the compute workload on gfx12. This is a workaround for the opencl test failure.
Signed-off-by Kenneth Feng <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev, · line 721
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +4
-2@@ -715,8 +715,10 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,void amdgpu_amdkfd_set_compute_idle (struct amdgpu_device *adev,bool idle) {enum amd_powergating_state state = idle ?AMD_PG_STATE_GATE :AMD_PG_STATE_UNGATE ; -if (IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==11 && - ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) <=64 )) { +if ((IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==11 && + ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) <=64 )) || + (IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==12 && + ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) >0x6C ))) {
If this is just a specific FW version that is problematic, we should just check the particular version. If this is a general problem, just check the IP version until the issue is fixed and then we can update the check for a specific fw version, etc.
Alex
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +0
-1pr_debug ("GFXOFF is %s\n" , idle ?"enabled" :"disabled" );amdgpu_gfx_off_ctrl (adev, idle); } else if ((IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 9) && --2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
Best Regards,
Kevin
-----Original Message-----
From: Kenneth Feng <[email protected]>
Sent: Thursday, January 9, 2025 16:25
To: [email protected]
Cc: Wang, Yang(Kevin) <[email protected]>; Feng, Kenneth <[email protected]>
Subject: [PATCH] drm/amdgpu: disable gfxoff with the compute workload on gfx12
Disable gfxoff with the compute workload on gfx12. This is a workaround for the opencl test failure.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +4 -3
@@ -715,8 +715,10 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev, void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle) {enum amd_powergating_state state = idle ?AMD_PG_STATE_GATE :AMD_PG_STATE_UNGATE ; -if (IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==11 && - ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) <=64 )) { +if ((IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==11 && + ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) <=64 )) || + (IP_VERSION_MAJ (amdgpu_ip_version (adev,GC_HWIP ,0 )) ==12 && + ((adev->mes.kiq_version &AMDGPU_MES_VERSION_MASK ) >0x6C ))) {pr_debug ("GFXOFF is %s\n" , idle ?"enabled" :"disabled" );amdgpu_gfx_off_ctrl (adev, idle); } else if ((IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 9) && --
2.34.1