[PATCH] drm/radeon: don't power gate paused UVD streams

Alex Deucher alexdeucher at gmail.com
Fri Jan 10 07:58:26 PST 2014


Applied.  thanks!

On Fri, Jan 10, 2014 at 10:05 AM, Christian König
<deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>  drivers/gpu/drm/radeon/radeon_pm.c  | 4 ++++
>  drivers/gpu/drm/radeon/radeon_uvd.c | 2 ++
>  2 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
> index 984097b..f80769e 100644
> --- a/drivers/gpu/drm/radeon/radeon_pm.c
> +++ b/drivers/gpu/drm/radeon/radeon_pm.c
> @@ -924,6 +924,10 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)
>
>         if (rdev->asic->dpm.powergate_uvd) {
>                 mutex_lock(&rdev->pm.mutex);
> +               /* don't powergate anything if we
> +                  have active but pause streams */
> +               enable |= rdev->pm.dpm.sd > 0;
> +               enable |= rdev->pm.dpm.hd > 0;
>                 /* enable/disable UVD */
>                 radeon_dpm_powergate_uvd(rdev, !enable);
>                 mutex_unlock(&rdev->pm.mutex);
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
> index b9c0529..4b5c1fc 100644
> --- a/drivers/gpu/drm/radeon/radeon_uvd.c
> +++ b/drivers/gpu/drm/radeon/radeon_uvd.c
> @@ -778,6 +778,8 @@ static void radeon_uvd_idle_work_handler(struct work_struct *work)
>
>         if (radeon_fence_count_emitted(rdev, R600_RING_TYPE_UVD_INDEX) == 0) {
>                 if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled) {
> +                       radeon_uvd_count_handles(rdev, &rdev->pm.dpm.sd,
> +                                                &rdev->pm.dpm.hd);
>                         radeon_dpm_enable_uvd(rdev, false);
>                 } else {
>                         radeon_set_uvd_clocks(rdev, 0, 0);
> --
> 1.8.1.2
>


More information about the dri-devel mailing list