[PATCH] drm/radeon: fix UVD message buffer validation
Alex Deucher
alexdeucher at gmail.com
Mon Aug 12 07:46:52 PDT 2013
On Sun, Aug 11, 2013 at 3:27 PM, Christian König
<deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> When the message buffer is currently moving block until it is idle again.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> Cc: stable at vger.kernel.org
Applied to my fixes tree.
Alex
> ---
> drivers/gpu/drm/radeon/radeon_uvd.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
> index f1c1575..b79f4f5 100644
> --- a/drivers/gpu/drm/radeon/radeon_uvd.c
> +++ b/drivers/gpu/drm/radeon/radeon_uvd.c
> @@ -356,6 +356,14 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
> return -EINVAL;
> }
>
> + if (bo->tbo.sync_obj) {
> + r = radeon_fence_wait(bo->tbo.sync_obj, false);
> + if (r) {
> + DRM_ERROR("Failed waiting for UVD message (%d)!\n", r);
> + return r;
> + }
> + }
> +
> r = radeon_bo_kmap(bo, &ptr);
> if (r) {
> DRM_ERROR("Failed mapping the UVD message (%d)!\n", r);
> --
> 1.7.9.5
>
More information about the dri-devel
mailing list