[PATCH 1/2] drm/amdgpu: always cancel uvd idel handler in uvd suspend

Christian König ckoenig.leichtzumerken at gmail.com
Fri Dec 15 09:23:09 UTC 2017


Am 15.12.2017 um 08:32 schrieb Jim Qu:
> Change-Id: I62720a2df92005c8838f2e6a505f7d4840903ebb
> Signed-off-by: Jim Qu <Jim.Qu at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com> for both.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index 916e516..89d59fd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -297,6 +297,8 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
>   	if (adev->uvd.vcpu_bo == NULL)
>   		return 0;
>   
> +	cancel_delayed_work_sync(&adev->uvd.idle_work);
> +
>   	for (i = 0; i < adev->uvd.max_handles; ++i)
>   		if (atomic_read(&adev->uvd.handles[i]))
>   			break;
> @@ -304,8 +306,6 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
>   	if (i == AMDGPU_MAX_UVD_HANDLES)
>   		return 0;
>   
> -	cancel_delayed_work_sync(&adev->uvd.idle_work);
> -
>   	size = amdgpu_bo_size(adev->uvd.vcpu_bo);
>   	ptr = adev->uvd.cpu_addr;
>   



More information about the amd-gfx mailing list