aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2014-08-14 01:22:31 -0400
committerAlex Deucher <alexander.deucher@amd.com>2014-08-15 00:58:19 -0400
commitc83dec3bb6c38629398b65c231c80978b3e00e14 (patch)
tree1ef02c86b39c6f73f377b54fdeb8796049bc209e /drivers
parentb07a657e3a05b81c8a30d60e3f3746ca5a48ee62 (diff)
drm/radeon/dpm: select the appropriate vce power state for KV/KB/ML
Compare the clock in the limits table to the requested evclk rather than just taking the first value. Improves vce performance in certain cases. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/kv_dpm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c
index c667d83bfa25..8b58e11b64fa 100644
--- a/drivers/gpu/drm/radeon/kv_dpm.c
+++ b/drivers/gpu/drm/radeon/kv_dpm.c
@@ -1438,14 +1438,14 @@ static int kv_update_uvd_dpm(struct radeon_device *rdev, bool gate)
1438 return kv_enable_uvd_dpm(rdev, !gate); 1438 return kv_enable_uvd_dpm(rdev, !gate);
1439} 1439}
1440 1440
1441static u8 kv_get_vce_boot_level(struct radeon_device *rdev) 1441static u8 kv_get_vce_boot_level(struct radeon_device *rdev, u32 evclk)
1442{ 1442{
1443 u8 i; 1443 u8 i;
1444 struct radeon_vce_clock_voltage_dependency_table *table = 1444 struct radeon_vce_clock_voltage_dependency_table *table =
1445 &rdev->pm.dpm.dyn_state.vce_clock_voltage_dependency_table; 1445 &rdev->pm.dpm.dyn_state.vce_clock_voltage_dependency_table;
1446 1446
1447 for (i = 0; i < table->count; i++) { 1447 for (i = 0; i < table->count; i++) {
1448 if (table->entries[i].evclk >= 0) /* XXX */ 1448 if (table->entries[i].evclk >= evclk)
1449 break; 1449 break;
1450 } 1450 }
1451 1451
@@ -1468,7 +1468,7 @@ static int kv_update_vce_dpm(struct radeon_device *rdev,
1468 if (pi->caps_stable_p_state) 1468 if (pi->caps_stable_p_state)
1469 pi->vce_boot_level = table->count - 1; 1469 pi->vce_boot_level = table->count - 1;
1470 else 1470 else
1471 pi->vce_boot_level = kv_get_vce_boot_level(rdev); 1471 pi->vce_boot_level = kv_get_vce_boot_level(rdev, radeon_new_state->evclk);
1472 1472
1473 ret = kv_copy_bytes_to_smc(rdev, 1473 ret = kv_copy_bytes_to_smc(rdev,
1474 pi->dpm_table_start + 1474 pi->dpm_table_start +