The patch below does not apply to the 3.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

>From ec65da385d46f63740c1c9230b891a6dcbd64c71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <[email protected]>
Date: Tue, 27 May 2014 02:56:36 +0200
Subject: [PATCH] drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command
 submission
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

It hangs the hardware.

Signed-off-by: Marek Olšák <[email protected]>
Reviewed-by: Christian König <[email protected]>
Cc: [email protected]

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;

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to