OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60a4454
)
drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission
author
Marek Olšák
<marek.olsak@amd.com>
Tue, 27 May 2014 00:56:36 +0000
(
02:56
+0200)
committer
Christian König
<christian.koenig@amd.com>
Fri, 30 May 2014 12:21:49 +0000
(14:21 +0200)
It hangs the hardware.
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/radeon_cs.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/radeon/radeon_cs.c
b/drivers/gpu/drm/radeon/radeon_cs.c
index
4b6f5b8
..
41ecf8a
100644
(file)
--- a/
drivers/gpu/drm/radeon/radeon_cs.c
+++ b/
drivers/gpu/drm/radeon/radeon_cs.c
@@
-152,6
+152,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].domain = domain;
if (domain == RADEON_GEM_DOMAIN_VRAM)
domain |= RADEON_GEM_DOMAIN_GTT;