drm/amdkfd: fix gfx_target_version for certain 11.0.3 devices
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 24 May 2023 18:30:12 +0000 (14:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 16:31:15 +0000 (12:31 -0400)
Certain boards with GC IP 11.0.3 need slightly different handling
in the shader compiler due to board specific bounding box
optimizations.

Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c

index 862a50f7b490dfe4ef3a53f026da0435164b9c72..ebc3c3f965f94b73c7915d65d9e7525760039217 100644 (file)
@@ -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: