drm/amd/display: properly handle family setting for early GC 11.5.4
Subsystems (3)
Alex Deucher
maintainerPATCH 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]>
Signed-off-by Alex Deucher <[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
@@ -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
@@ -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
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]>Signed-off-by Alex Deucher <[email protected]>
Reviewed-by Mario Limonciello (AMD) <[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@@ -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@@ -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;