drm/amdgpu: convert code name to ip version for athub
Subsystems (2)
PATCH 1/2 drm/amdgpu: convert code name to ip version for athub
Use IP version rather than codename for athub.
Signed-off-by Aaron Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/athub_v1_0.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/athub_v1_0.c +7 -6
@@ -68,12 +68,13 @@ int athub_v1_0_set_clockgating(struct amdgpu_device *adev,if (amdgpu_sriov_vf (adev))return 0 ; -switch (adev->asic_type) { -case CHIP_VEGA10 : -case CHIP_VEGA12 : -case CHIP_VEGA20 : -case CHIP_RAVEN : -case CHIP_RENOIR : +switch (adev->ip_versions[ATHUB_HWIP ][0 ]) { +case IP_VERSION (9 ,0 ,0 ): +case IP_VERSION (9 ,1 ,0 ): +case IP_VERSION (9 ,2 ,0 ): +case IP_VERSION (9 ,3 ,0 ): +case IP_VERSION (9 ,4 ,0 ): +case IP_VERSION (1 ,5 ,0 ):athub_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ); athub_update_medium_grain_light_sleep(adev,
Signature · 1 line
2.25.1
PATCH 2/2 drm/amdgpu: add 1.3.1/2.4.0 athub CG support
This patch adds 1.3.1/2.4.0 athub clock gating support.
Signed-off-by Aaron Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/athub_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/athub_v2_1.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/athub_v2_0.c +1 -0
@@ -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,
drivers/gpu/drm/amd/amdgpu/athub_v2_1.c +1 -0
@@ -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 ;
Signature · 1 line
2.25.1
Re: [PATCH 2/2] drm/amdgpu: add 1.3.1/2.4.0 athub CG support
Quoted 3 lines · Aaron
This patch adds 1.3.1/2.4.0 athub clock gating support.
Signed-off-by Aaron Liu <[email protected]>
Series are Reviewed-by: Huang Rui <[email protected]>
Quoted 32 lines
--- drivers/gpu/drm/amd/amdgpu/athub_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/athub_v2_1.c | 1 + 2 files changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/athub_v2_0.c +1
-0@@ -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,drivers/gpu/drm/amd/amdgpu/athub_v2_1.c +1
-0@@ -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 ;Signature · 1 line
2.25.1
Alex Deucher
Reviewed-byRe: [PATCH 2/2] drm/amdgpu: add 1.3.1/2.4.0 athub CG support
Reviewed-by Alex Deucher <[email protected]>
Quoted 40 lines · Huang Rui
Quoted 3 lines · Aaron
This patch adds 1.3.1/2.4.0 athub clock gating support.
Signed-off-by Aaron Liu <[email protected]>Series are Reviewed-by: Huang Rui <[email protected]>
Quoted 32 lines
--- drivers/gpu/drm/amd/amdgpu/athub_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/athub_v2_1.c | 1 + 2 files changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/athub_v2_0.c +1
-0@@ -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,drivers/gpu/drm/amd/amdgpu/athub_v2_1.c +1
-1@@ -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 ; --2.25.1
Reviewed-by Alex Deucher <[email protected]>
Quoted 35 lines · Aaron Liu
Use IP version rather than codename for athub.
Signed-off-by Aaron Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/athub_v1_0.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/athub_v1_0.c +7
-7@@ -68,12 +68,13 @@ int athub_v1_0_set_clockgating(struct amdgpu_device *adev,if (amdgpu_sriov_vf (adev))return 0 ; -switch (adev->asic_type) { -case CHIP_VEGA10 : -case CHIP_VEGA12 : -case CHIP_VEGA20 : -case CHIP_RAVEN : -case CHIP_RENOIR : +switch (adev->ip_versions[ATHUB_HWIP ][0 ]) { +case IP_VERSION (9 ,0 ,0 ): +case IP_VERSION (9 ,1 ,0 ): +case IP_VERSION (9 ,2 ,0 ): +case IP_VERSION (9 ,3 ,0 ): +case IP_VERSION (9 ,4 ,0 ): +case IP_VERSION (1 ,5 ,0 ):athub_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ); athub_update_medium_grain_light_sleep(adev, --2.25.1