Commit c2546f55 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/gfx8: rename some pg functions

So they can be shared with other asics.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fb16007b
...@@ -5187,15 +5187,17 @@ static int gfx_v8_0_late_init(void *handle) ...@@ -5187,15 +5187,17 @@ static int gfx_v8_0_late_init(void *handle)
return 0; return 0;
} }
static void polaris11_enable_gfx_static_mg_power_gating(struct amdgpu_device *adev, static void gfx_v8_0_enable_gfx_static_mg_power_gating(struct amdgpu_device *adev,
bool enable) bool enable)
{ {
uint32_t data, temp; uint32_t data, temp;
/* Send msg to SMU via Powerplay */ if (adev->asic_type == CHIP_POLARIS11)
amdgpu_set_powergating_state(adev, /* Send msg to SMU via Powerplay */
AMD_IP_BLOCK_TYPE_SMC, amdgpu_set_powergating_state(adev,
enable ? AMD_PG_STATE_GATE : AMD_PG_STATE_UNGATE); AMD_IP_BLOCK_TYPE_SMC,
enable ?
AMD_PG_STATE_GATE : AMD_PG_STATE_UNGATE);
if (enable) { if (enable) {
/* Enable static MGPG */ /* Enable static MGPG */
...@@ -5213,8 +5215,8 @@ static void polaris11_enable_gfx_static_mg_power_gating(struct amdgpu_device *ad ...@@ -5213,8 +5215,8 @@ static void polaris11_enable_gfx_static_mg_power_gating(struct amdgpu_device *ad
} }
} }
static void polaris11_enable_gfx_dynamic_mg_power_gating(struct amdgpu_device *adev, static void gfx_v8_0_enable_gfx_dynamic_mg_power_gating(struct amdgpu_device *adev,
bool enable) bool enable)
{ {
uint32_t data, temp; uint32_t data, temp;
...@@ -5266,10 +5268,10 @@ static int gfx_v8_0_set_powergating_state(void *handle, ...@@ -5266,10 +5268,10 @@ static int gfx_v8_0_set_powergating_state(void *handle,
switch (adev->asic_type) { switch (adev->asic_type) {
case CHIP_POLARIS11: case CHIP_POLARIS11:
if (adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG) if (adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG)
polaris11_enable_gfx_static_mg_power_gating(adev, gfx_v8_0_enable_gfx_static_mg_power_gating(adev,
state == AMD_PG_STATE_GATE ? true : false); state == AMD_PG_STATE_GATE ? true : false);
else if (adev->pg_flags & AMD_PG_SUPPORT_GFX_DMG) else if (adev->pg_flags & AMD_PG_SUPPORT_GFX_DMG)
polaris11_enable_gfx_dynamic_mg_power_gating(adev, gfx_v8_0_enable_gfx_dynamic_mg_power_gating(adev,
state == AMD_PG_STATE_GATE ? true : false); state == AMD_PG_STATE_GATE ? true : false);
else else
polaris11_enable_gfx_quick_mg_power_gating(adev, polaris11_enable_gfx_quick_mg_power_gating(adev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment