summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2014-05-27 02:56:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 11:18:25 -0700
commitf7e9f1397eb3ebada6ff54b263991028970c07a4 (patch)
treec6f1d18decbf0db3452f47809f6ac269d5aec057 /drivers/gpu
parent42004014feb3e44d491083f26f570e99a12523d8 (diff)
downloadkernel-common-f7e9f1397eb3ebada6ff54b263991028970c07a4.tar.gz
kernel-common-f7e9f1397eb3ebada6ff54b263991028970c07a4.tar.bz2
kernel-common-f7e9f1397eb3ebada6ff54b263991028970c07a4.zip
drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission
commit ec65da385d46f63740c1c9230b891a6dcbd64c71 upstream. It hangs the hardware. Signed-off-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 7993aec86acc..7f2d6c0d11c1 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -97,6 +97,12 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
uint32_t domain = r->write_domain ?
r->write_domain : r->read_domains;
+ if (domain & RADEON_GEM_DOMAIN_CPU) {
+ DRM_ERROR("RADEON_GEM_DOMAIN_CPU is not valid "
+ "for command submission\n");
+ return -EINVAL;
+ }
+
p->relocs[i].lobj.domain = domain;
if (domain == RADEON_GEM_DOMAIN_VRAM)
domain |= RADEON_GEM_DOMAIN_GTT;