drm/amdkfd: fix gfx_target_version for certain 11.0.3 devices
Subsystems (3)
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: fix gfx_target_version for certain 11.0.3 devices
Certain boards with GC IP 11.0.3 need slightly different handling in the shader compiler due to board specific bounding box optimizations.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +9 -2
@@ -411,8 +411,15 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf) f2g = &gfx_v11_kfd2kgd;break ;case IP_VERSION (11 ,0 ,3 ): -/* Note: Compiler version is 11.0.1 while HW version is 11.0.3 */ - gfx_target_version =110001 ; +if ((adev->pdev->device ==0x7460 && + adev->pdev->revision ==0x00 ) || + (adev->pdev->device ==0x7461 && + adev->pdev->revision ==0x00 )) +/* Note: Compiler version is 11.0.5 while HW version is 11.0.3 */ + gfx_target_version =110005 ; +else +/* Note: Compiler version is 11.0.1 while HW version is 11.0.3 */ + gfx_target_version =110001 ; f2g = &gfx_v11_kfd2kgd;break ;default :
Signature · 1 line
2.40.1
Quoted 5 lines · Alex Deucher
Certain boards with GC IP 11.0.3 need slightly different handling in the shader compiler due to board specific bounding box optimizations.
Signed-off-by Alex Deucher <[email protected]>
Acked-by Felix Kuehling <[email protected]>
Quoted 26 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_device.c +9
-2@@ -411,8 +411,15 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf) f2g = &gfx_v11_kfd2kgd;break ;case IP_VERSION (11 ,0 ,3 ): -/* Note: Compiler version is 11.0.1 while HW version is 11.0.3 */ - gfx_target_version =110001 ; +if ((adev->pdev->device ==0x7460 && + adev->pdev->revision ==0x00 ) || + (adev->pdev->device ==0x7461 && + adev->pdev->revision ==0x00 )) +/* Note: Compiler version is 11.0.5 while HW version is 11.0.3 */ + gfx_target_version =110005 ; +else +/* Note: Compiler version is 11.0.1 while HW version is 11.0.3 */ + gfx_target_version =110001 ; f2g = &gfx_v11_kfd2kgd;break ;default :