* [PATCH] drm/radeon: use variable UVD clocks
@ 2014-02-21 16:34 Alex Deucher
2014-02-21 17:01 ` Christian König
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2014-02-21 16:34 UTC (permalink / raw)
To: dri-devel; +Cc: Alex Deucher
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>
---
drivers/gpu/drm/radeon/radeon_pm.c | 3 ---
drivers/gpu/drm/radeon/radeon_uvd.c | 3 +--
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 6f20bb0..2cb2fb8 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -956,8 +956,6 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)
if (enable) {
mutex_lock(&rdev->pm.mutex);
rdev->pm.dpm.uvd_active = true;
- /* disable this for now */
-#if 0
if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd == 0))
dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_SD;
else if ((rdev->pm.dpm.sd == 2) && (rdev->pm.dpm.hd == 0))
@@ -967,7 +965,6 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)
else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2))
dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_HD2;
else
-#endif
dpm_state = POWER_STATE_TYPE_INTERNAL_UVD;
rdev->pm.dpm.state = dpm_state;
mutex_unlock(&rdev->pm.mutex);
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index 6781fee..ceb7b28 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)
(rdev->pm.dpm.hd != hd)) {
rdev->pm.dpm.sd = sd;
rdev->pm.dpm.hd = hd;
- /* disable this for now */
- /*streams_changed = true;*/
+ streams_changed = true;
}
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] drm/radeon: use variable UVD clocks
2014-02-21 16:34 [PATCH] drm/radeon: use variable UVD clocks Alex Deucher
@ 2014-02-21 17:01 ` Christian König
2014-02-21 17:30 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2014-02-21 17:01 UTC (permalink / raw)
To: Alex Deucher, dri-devel; +Cc: Alex Deucher
Am 21.02.2014 17:34, schrieb Alex Deucher:
> 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>
Additional to that we should also count the number of frames per second
submitted to choose a power state, but that's not so urgent right now.
Do you want to pull that in through drm-fixes or should I apply it to
the drm-next-3.15 tree? For me it sounds more like drm-next.
Christian.
> ---
> drivers/gpu/drm/radeon/radeon_pm.c | 3 ---
> drivers/gpu/drm/radeon/radeon_uvd.c | 3 +--
> 2 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
> index 6f20bb0..2cb2fb8 100644
> --- a/drivers/gpu/drm/radeon/radeon_pm.c
> +++ b/drivers/gpu/drm/radeon/radeon_pm.c
> @@ -956,8 +956,6 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)
> if (enable) {
> mutex_lock(&rdev->pm.mutex);
> rdev->pm.dpm.uvd_active = true;
> - /* disable this for now */
> -#if 0
> if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd == 0))
> dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_SD;
> else if ((rdev->pm.dpm.sd == 2) && (rdev->pm.dpm.hd == 0))
> @@ -967,7 +965,6 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)
> else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2))
> dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_HD2;
> else
> -#endif
> dpm_state = POWER_STATE_TYPE_INTERNAL_UVD;
> rdev->pm.dpm.state = dpm_state;
> mutex_unlock(&rdev->pm.mutex);
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
> index 6781fee..ceb7b28 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)
> (rdev->pm.dpm.hd != hd)) {
> rdev->pm.dpm.sd = sd;
> rdev->pm.dpm.hd = hd;
> - /* disable this for now */
> - /*streams_changed = true;*/
> + streams_changed = true;
> }
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/radeon: use variable UVD clocks
2014-02-21 17:01 ` Christian König
@ 2014-02-21 17:30 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2014-02-21 17:30 UTC (permalink / raw)
To: Christian König; +Cc: Alex Deucher, Maling list - DRI developers
On Fri, Feb 21, 2014 at 12:01 PM, Christian König
<deathsimple@vodafone.de> wrote:
> Am 21.02.2014 17:34, schrieb Alex Deucher:
>
>> 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>
>
> Additional to that we should also count the number of frames per second
> submitted to choose a power state, but that's not so urgent right now.
>
> Do you want to pull that in through drm-fixes or should I apply it to the
> drm-next-3.15 tree? For me it sounds more like drm-next.
Yes, this is drm-next material. thanks!
Alex
>
> Christian.
>
>
>> ---
>> drivers/gpu/drm/radeon/radeon_pm.c | 3 ---
>> drivers/gpu/drm/radeon/radeon_uvd.c | 3 +--
>> 2 files changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_pm.c
>> b/drivers/gpu/drm/radeon/radeon_pm.c
>> index 6f20bb0..2cb2fb8 100644
>> --- a/drivers/gpu/drm/radeon/radeon_pm.c
>> +++ b/drivers/gpu/drm/radeon/radeon_pm.c
>> @@ -956,8 +956,6 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev,
>> bool enable)
>> if (enable) {
>> mutex_lock(&rdev->pm.mutex);
>> rdev->pm.dpm.uvd_active = true;
>> - /* disable this for now */
>> -#if 0
>> if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd ==
>> 0))
>> dpm_state =
>> POWER_STATE_TYPE_INTERNAL_UVD_SD;
>> else if ((rdev->pm.dpm.sd == 2) &&
>> (rdev->pm.dpm.hd == 0))
>> @@ -967,7 +965,6 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev,
>> bool enable)
>> else if ((rdev->pm.dpm.sd == 0) &&
>> (rdev->pm.dpm.hd == 2))
>> dpm_state =
>> POWER_STATE_TYPE_INTERNAL_UVD_HD2;
>> else
>> -#endif
>> dpm_state = POWER_STATE_TYPE_INTERNAL_UVD;
>> rdev->pm.dpm.state = dpm_state;
>> mutex_unlock(&rdev->pm.mutex);
>> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c
>> b/drivers/gpu/drm/radeon/radeon_uvd.c
>> index 6781fee..ceb7b28 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)
>> (rdev->pm.dpm.hd != hd)) {
>> rdev->pm.dpm.sd = sd;
>> rdev->pm.dpm.hd = hd;
>> - /* disable this for now */
>> - /*streams_changed = true;*/
>> + streams_changed = true;
>> }
>> }
>>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-21 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 16:34 [PATCH] drm/radeon: use variable UVD clocks Alex Deucher
2014-02-21 17:01 ` Christian König
2014-02-21 17:30 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.