[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20badb285d5c13d6c4c8ab2a47203d73378da50b.1405685481.git.jslaby@suse.cz>
Date: Fri, 18 Jul 2014 14:11:28 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Marek Olšák <marek.olsak@....com>,
Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 083/170] drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission
From: Marek Olšák <marek.olsak@....com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit ec65da385d46f63740c1c9230b891a6dcbd64c71 upstream.
It hangs the hardware.
Signed-off-by: Marek Olšák <marek.olsak@....com>
Reviewed-by: Christian König <christian.koenig@....com>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
drivers/gpu/drm/radeon/radeon_cs.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index b2b8b38f0319..ed9a997c99a3 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;
--
2.0.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists