drm/amdgpu: add 1.3.1/2.4.0 athub CG support
authorAaron Liu <aaron.liu@amd.com>
Thu, 27 Jan 2022 01:30:33 +0000 (09:30 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jan 2022 20:49:42 +0000 (15:49 -0500)
This patch adds 1.3.1/2.4.0 athub clock gating support.

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/athub_v2_0.c
drivers/gpu/drm/amd/amdgpu/athub_v2_1.c

index ab6a07e5e8c4bccd639f58cee9a142683b2305db..a720436857b473986fa5f0b6d7b27abd97c92f01 100644 (file)
@@ -78,6 +78,7 @@ int athub_v2_0_set_clockgating(struct amdgpu_device *adev,
                return 0;
 
        switch (adev->ip_versions[ATHUB_HWIP][0]) {
+       case IP_VERSION(1, 3, 1):
        case IP_VERSION(2, 0, 0):
        case IP_VERSION(2, 0, 2):
                athub_v2_0_update_medium_grain_clock_gating(adev,
index 2edefd10e56ce140f92e3a484db3330662e0ef39..ad8e87d3d2cb115365c0597fb47f768cf9478901 100644 (file)
@@ -74,6 +74,7 @@ int athub_v2_1_set_clockgating(struct amdgpu_device *adev,
        case IP_VERSION(2, 1, 0):
        case IP_VERSION(2, 1, 1):
        case IP_VERSION(2, 1, 2):
+       case IP_VERSION(2, 4, 0):
                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;