diff options
author | Marek Olšák <marek.olsak@amd.com> | 2014-05-27 02:56:36 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2014-05-30 14:21:49 +0200 |
commit | ec65da385d46f63740c1c9230b891a6dcbd64c71 (patch) | |
tree | 96256c8ba0553f8486f7ad7b1d672d63a77ba25a /drivers | |
parent | 60a445405a1731bac2279eab354173c9c3156747 (diff) |
drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cs.c | 6 |
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 4b6f5b824153..41ecf8a60611 100644 --- 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; |