diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-08-28 18:53:50 -0400 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2014-02-18 10:11:43 -0500 |
commit | 44493ba959cfaa7506498441397f83d180e4a509 (patch) | |
tree | e64bf64286b3d6fd6f3f3d9ab3b2a582a0d6d104 | |
parent | 03afe6f6480f2544d6cd18866556f1f76bb05f14 (diff) |
drm/radeon/dpm: properly enable/disable vce when vce pg is enabled
The adds the appropriate function calls to properly re-init
vce before it's used after it has been power gated.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/radeon/kv_dpm.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c index e972b885e297..9ee1f28bbd85 100644 --- a/drivers/gpu/drm/radeon/kv_dpm.c +++ b/drivers/gpu/drm/radeon/kv_dpm.c | |||
@@ -1412,7 +1412,6 @@ static int kv_update_vce_dpm(struct radeon_device *rdev, | |||
1412 | 1412 | ||
1413 | if (radeon_new_state->evclk > 0 && radeon_current_state->evclk == 0) { | 1413 | if (radeon_new_state->evclk > 0 && radeon_current_state->evclk == 0) { |
1414 | kv_dpm_powergate_vce(rdev, false); | 1414 | kv_dpm_powergate_vce(rdev, false); |
1415 | /* XXX cik_vce_resume(); */ | ||
1416 | if (pi->caps_stable_p_state) | 1415 | if (pi->caps_stable_p_state) |
1417 | pi->vce_boot_level = table->count - 1; | 1416 | pi->vce_boot_level = table->count - 1; |
1418 | else | 1417 | else |
@@ -1435,7 +1434,6 @@ static int kv_update_vce_dpm(struct radeon_device *rdev, | |||
1435 | kv_enable_vce_dpm(rdev, true); | 1434 | kv_enable_vce_dpm(rdev, true); |
1436 | } else if (radeon_new_state->evclk == 0 && radeon_current_state->evclk > 0) { | 1435 | } else if (radeon_new_state->evclk == 0 && radeon_current_state->evclk > 0) { |
1437 | kv_enable_vce_dpm(rdev, false); | 1436 | kv_enable_vce_dpm(rdev, false); |
1438 | /* XXX cik_vce_suspend(); */ | ||
1439 | kv_dpm_powergate_vce(rdev, true); | 1437 | kv_dpm_powergate_vce(rdev, true); |
1440 | } | 1438 | } |
1441 | 1439 | ||
@@ -1575,11 +1573,16 @@ static void kv_dpm_powergate_vce(struct radeon_device *rdev, bool gate) | |||
1575 | pi->vce_power_gated = gate; | 1573 | pi->vce_power_gated = gate; |
1576 | 1574 | ||
1577 | if (gate) { | 1575 | if (gate) { |
1578 | if (pi->caps_vce_pg) | 1576 | if (pi->caps_vce_pg) { |
1577 | /* XXX do we need a vce_v1_0_stop() ? */ | ||
1579 | kv_notify_message_to_smu(rdev, PPSMC_MSG_VCEPowerOFF); | 1578 | kv_notify_message_to_smu(rdev, PPSMC_MSG_VCEPowerOFF); |
1579 | } | ||
1580 | } else { | 1580 | } else { |
1581 | if (pi->caps_vce_pg) | 1581 | if (pi->caps_vce_pg) { |
1582 | kv_notify_message_to_smu(rdev, PPSMC_MSG_VCEPowerON); | 1582 | kv_notify_message_to_smu(rdev, PPSMC_MSG_VCEPowerON); |
1583 | vce_v2_0_resume(rdev); | ||
1584 | vce_v1_0_start(rdev); | ||
1585 | } | ||
1583 | } | 1586 | } |
1584 | } | 1587 | } |
1585 | 1588 | ||