Skip to contentSkip to conversation

drm/amd: Fix renoir/green sardine MP0 IP version detection

PATCH In review Mario Limonciello 2 participants 2 messages Jan 14, 2023 – Jan 15, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd: Fix renoir/green sardine MP0 IP version detection

The existing codebase never had a case for detecting MP0 version on Renoir and instead relied upon hardcoded chip name. This was missed as part of the changes to migrate all IP blocks to build filenames from amdgpu_ucode.c.

Consequently, Renoir tries to fetch a binary with 11_0_3 in the filename and since it's supposed to have "renoir" in the filename fails to probe. The fbdev still works though so the series worked.

Add a case for Renoir into the legacy table to ensure the right ASD and TA firmware load again.

Cc Alex Hung <[email protected]>
Fixes 994a97447e38 ("drm/amd: Parse both v1 and v2 TA microcode headers using same function")
Fixes 54a3e032340e ("drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +3 -6
index 47549d659d9b0..c03824d0311bd 100644
@@ -1087,6 +1087,8 @@ static const char *amdgpu_ucode_legacy_naming(struct amdgpu_device *adev, int bl
 			return "navi10";
 		case IP_VERSION(11, 0, 2):
 			return "vega20";
+		case IP_VERSION(11, 0, 3):
+			return "renoir";
 		case IP_VERSION(11, 0, 4):
 			return "arcturus";
 		case IP_VERSION(11, 0, 5):
@@ -1104,12 +1106,7 @@ static const char *amdgpu_ucode_legacy_naming(struct amdgpu_device *adev, int bl
 		case IP_VERSION(11, 5, 0):
 			return "vangogh";
 		case IP_VERSION(12, 0, 1):
-			if (adev->asic_type == CHIP_RENOIR) {
-				if (adev->apu_flags & AMD_APU_IS_RENOIR)
-					return "renoir";
-				return "green_sardine";
-			}
-			break;
+			return "green_sardine";
 		case IP_VERSION(13, 0, 2):
 			return "aldebaran";
 		case IP_VERSION(13, 0, 1):
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Mario Limonciello

The existing codebase never had a case for detecting MP0 version on Renoir and instead relied upon hardcoded chip name. This was missed as part of the changes to migrate all IP blocks to build filenames from amdgpu_ucode.c.

Consequently, Renoir tries to fetch a binary with 11_0_3 in the filename and since it's supposed to have "renoir" in the filename fails to probe. The fbdev still works though so the series worked.

Add a case for Renoir into the legacy table to ensure the right ASD and TA firmware load again.

Quoted 6 lines
Cc Alex Hung <[email protected]>
Fixes 994a97447e38 ("drm/amd: Parse both v1 and v2 TA microcode headers using same function")
Fixes 54a3e032340e ("drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode")
Quoted 34 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +3 -7
index 47549d659d9b0..c03824d0311bd 100644
@@ -1087,6 +1087,8 @@ static const char *amdgpu_ucode_legacy_naming(struct amdgpu_device *adev, int bl
                        return "navi10";
                case IP_VERSION(11, 0, 2):
                        return "vega20";
+               case IP_VERSION(11, 0, 3):
+                       return "renoir";
                case IP_VERSION(11, 0, 4):
                        return "arcturus";
                case IP_VERSION(11, 0, 5):
@@ -1104,12 +1106,7 @@ static const char *amdgpu_ucode_legacy_naming(struct amdgpu_device *adev, int bl
                case IP_VERSION(11, 5, 0):
                        return "vangogh";
                case IP_VERSION(12, 0, 1):
-                       if (adev->asic_type == CHIP_RENOIR) {
-                               if (adev->apu_flags & AMD_APU_IS_RENOIR)
-                                       return "renoir";
-                               return "green_sardine";
-                       }
-                       break;
+                       return "green_sardine";
                case IP_VERSION(13, 0, 2):
                        return "aldebaran";
                case IP_VERSION(13, 0, 1):
--

2.34.1