[PATCH] drm/radeon: fix UVD message buffer validation
Christian König
deathsimple at vodafone.de
Sun Aug 11 12:27:56 PDT 2013
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
---
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