drm/amdgpu/athub2.1: convert to IP version checking
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 27 Jul 2021 20:39:42 +0000 (16:39 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Oct 2021 19:22:59 +0000 (15:22 -0400)
Use IP versions rather than asic_type to differentiate
IP version specific features.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/athub_v2_1.c

index c12c2900732be54db9651697803186d716b7ceeb..0fbeaf05204e30efffafa8f9078ec356bef03d99 100644 (file)
@@ -70,11 +70,10 @@ int athub_v2_1_set_clockgating(struct amdgpu_device *adev,
        if (amdgpu_sriov_vf(adev))
                return 0;
 
-       switch (adev->asic_type) {
-       case CHIP_SIENNA_CICHLID:
-       case CHIP_NAVY_FLOUNDER:
-       case CHIP_DIMGREY_CAVEFISH:
-       case CHIP_BEIGE_GOBY:
+       switch (adev->ip_versions[ATHUB_HWIP]) {
+       case IP_VERSION(2, 1, 0):
+       case IP_VERSION(2, 1, 1):
+       case IP_VERSION(2, 1, 2):
                athub_v2_1_update_medium_grain_clock_gating(adev, state == AMD_CG_STATE_GATE);
                athub_v2_1_update_medium_grain_light_sleep(adev, state == AMD_CG_STATE_GATE);
                break;