aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2014-02-21 11:34:35 -0500
committerChristian König <christian.koenig@amd.com>2014-02-28 04:53:20 -0500
commit14a9579ddbf15dd1992a9481a4ec80b0b91656d5 (patch)
treead9f4313dc7e7fe505c7f977b93be87b097895d8
parent37615527c5669f0c332534a797e5aaa175b6f3cb (diff)
drm/radeon: use variable UVD clocks
Now that Christian fixed the performance problems with the feedback buffer in mesa, we can enable variable UVD clocks. There are multiple UVD power states associated with different types and numbers of streams. This uses the appropriate state based on that information rather than always using the fastest UVD clocks which saves some power. One possible downside is that this may adversely affect decode benchmarks since these power states target specific playback requirements rather than maximum performance. If that becomes an issue, we can add a sysfs attribute to force the max UVD state. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c3
-rw-r--r--drivers/gpu/drm/radeon/radeon_uvd.c3
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 0119af46ede3..ee738a524639 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -943,8 +943,6 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)
943 if (enable) { 943 if (enable) {
944 mutex_lock(&rdev->pm.mutex); 944 mutex_lock(&rdev->pm.mutex);
945 rdev->pm.dpm.uvd_active = true; 945 rdev->pm.dpm.uvd_active = true;
946 /* disable this for now */
947#if 0
948 if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd == 0)) 946 if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd == 0))
949 dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_SD; 947 dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_SD;
950 else if ((rdev->pm.dpm.sd == 2) && (rdev->pm.dpm.hd == 0)) 948 else if ((rdev->pm.dpm.sd == 2) && (rdev->pm.dpm.hd == 0))
@@ -954,7 +952,6 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)
954 else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2)) 952 else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2))
955 dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_HD2; 953 dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_HD2;
956 else 954 else
957#endif
958 dpm_state = POWER_STATE_TYPE_INTERNAL_UVD; 955 dpm_state = POWER_STATE_TYPE_INTERNAL_UVD;
959 rdev->pm.dpm.state = dpm_state; 956 rdev->pm.dpm.state = dpm_state;
960 mutex_unlock(&rdev->pm.mutex); 957 mutex_unlock(&rdev->pm.mutex);
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index 6781fee1eaad..ceb7b289b745 100644
--- a/drivers/gpu/drm/radeon/radeon_uvd.c
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c
@@ -805,8 +805,7 @@ void radeon_uvd_note_usage(struct radeon_device *rdev)
805 (rdev->pm.dpm.hd != hd)) { 805 (rdev->pm.dpm.hd != hd)) {
806 rdev->pm.dpm.sd = sd; 806 rdev->pm.dpm.sd = sd;
807 rdev->pm.dpm.hd = hd; 807 rdev->pm.dpm.hd = hd;
808 /* disable this for now */ 808 streams_changed = true;
809 /*streams_changed = true;*/
810 } 809 }
811 } 810 }
812 811