Skip to contentSkip to conversation

drm/amd/display: properly handle family setting for early GC 11.5.4

PATCH In review Alex Deucher 2 participants 2 messages Apr 23

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amd/display: properly handle family setting for early GC 11.5.4

Early variants need an override.

Fixes 57d00816c6a9 ("drm/amdgpu: set family for GC 11.5.4")
Cc Pratik Vishwakarma <[email protected]>
Cc Roman Li <[email protected]>
Cc Mario Limonciello <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c     | 4 +---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++++-
 2 files changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -3
index 31d85606d31b5..5dbe3d6963b9a 100644
@@ -3091,10 +3091,8 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(11, 5, 1):
 	case IP_VERSION(11, 5, 2):
 	case IP_VERSION(11, 5, 3):
-		adev->family = AMDGPU_FAMILY_GC_11_5_0;
-		break;
 	case IP_VERSION(11, 5, 4):
-		adev->family = AMDGPU_FAMILY_GC_11_5_4;
+		adev->family = AMDGPU_FAMILY_GC_11_5_0;
 		break;
 	case IP_VERSION(12, 0, 0):
 	case IP_VERSION(12, 0, 1):
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -1
index 3fa4dbda4517c..a8e6bf3e116e4 100644
@@ -1967,7 +1967,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 		goto error;
 	}
 
-	init_data.asic_id.chip_family = adev->family;
+	/* special handling for early revisions of GC 11.5.4 */
+	if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 4))
+		init_data.asic_id.chip_family = AMDGPU_FAMILY_GC_11_5_4;
+	else
+		init_data.asic_id.chip_family = adev->family;
 
 	init_data.asic_id.pci_revision_id = adev->pdev->revision;
 	init_data.asic_id.hw_internal_rev = adev->external_rev_id;
Signature · 1 line
2.53.0
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Alex Deucher

Early variants need an override.

Fixes 57d00816c6a9 ("drm/amdgpu: set family for GC 11.5.4")
Cc Pratik Vishwakarma <[email protected]>
Cc Roman Li <[email protected]>
Cc Mario Limonciello <[email protected]>
Quoted 38 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c     | 4 +---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++++-
  2 files changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -3
index 31d85606d31b5..5dbe3d6963b9a 100644
@@ -3091,10 +3091,8 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
  	case IP_VERSION(11, 5, 1):
  	case IP_VERSION(11, 5, 2):
  	case IP_VERSION(11, 5, 3):
-		adev->family = AMDGPU_FAMILY_GC_11_5_0;
-		break;
  	case IP_VERSION(11, 5, 4):
-		adev->family = AMDGPU_FAMILY_GC_11_5_4;
+		adev->family = AMDGPU_FAMILY_GC_11_5_0;
  		break;
  	case IP_VERSION(12, 0, 0):
  	case IP_VERSION(12, 0, 1):
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -1
index 3fa4dbda4517c..a8e6bf3e116e4 100644
@@ -1967,7 +1967,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
  		goto error;
  	}
 
-	init_data.asic_id.chip_family = adev->family;
+	/* special handling for early revisions of GC 11.5.4 */
+	if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 5, 4))
+		init_data.asic_id.chip_family = AMDGPU_FAMILY_GC_11_5_4;
+	else
+		init_data.asic_id.chip_family = adev->family;
 
  	init_data.asic_id.pci_revision_id = adev->pdev->revision;
  	init_data.asic_id.hw_internal_rev = adev->external_rev_id;