drm/amdgpu: add gmc cg support for navy_flounder

The athub version used for navy_flounder is v2.1.

Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Jiansong Chen 2020-04-13 17:26:30 +08:00 committed by Alex Deucher
parent 8f8463dddc
commit 922783755b
2 changed files with 5 additions and 2 deletions

View File

@ -1125,7 +1125,8 @@ static int gmc_v10_0_set_clockgating_state(void *handle,
if (r) if (r)
return r; return r;
if (adev->asic_type == CHIP_SIENNA_CICHLID) if (adev->asic_type == CHIP_SIENNA_CICHLID ||
adev->asic_type == CHIP_NAVY_FLOUNDER)
return athub_v2_1_set_clockgating(adev, state); return athub_v2_1_set_clockgating(adev, state);
else else
return athub_v2_0_set_clockgating(adev, state); return athub_v2_0_set_clockgating(adev, state);
@ -1137,7 +1138,8 @@ static void gmc_v10_0_get_clockgating_state(void *handle, u32 *flags)
mmhub_v2_0_get_clockgating(adev, flags); mmhub_v2_0_get_clockgating(adev, flags);
if (adev->asic_type == CHIP_SIENNA_CICHLID) if (adev->asic_type == CHIP_SIENNA_CICHLID ||
adev->asic_type == CHIP_NAVY_FLOUNDER)
athub_v2_1_get_clockgating(adev, flags); athub_v2_1_get_clockgating(adev, flags);
else else
athub_v2_0_get_clockgating(adev, flags); athub_v2_0_get_clockgating(adev, flags);

View File

@ -482,6 +482,7 @@ int mmhub_v2_0_set_clockgating(struct amdgpu_device *adev,
case CHIP_NAVI14: case CHIP_NAVI14:
case CHIP_NAVI12: case CHIP_NAVI12:
case CHIP_SIENNA_CICHLID: case CHIP_SIENNA_CICHLID:
case CHIP_NAVY_FLOUNDER:
mmhub_v2_0_update_medium_grain_clock_gating(adev, mmhub_v2_0_update_medium_grain_clock_gating(adev,
state == AMD_CG_STATE_GATE); state == AMD_CG_STATE_GATE);
mmhub_v2_0_update_medium_grain_light_sleep(adev, mmhub_v2_0_update_medium_grain_light_sleep(adev,