[kernel/f16] Add patch to fix corrupted text with i915 (rhbz 852210)

Josh Boyer jwboyer at fedoraproject.org
Wed Oct 24 12:28:12 UTC 2012


commit bf00e6862766bf0ff0d1acbe9231d088e0256654
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Wed Oct 24 08:23:01 2012 -0400

    Add patch to fix corrupted text with i915 (rhbz 852210)

 ...e-cpu-relocations-if-the-object-is-in-the.patch |   33 ++++++++++++++++++++
 kernel.spec                                        |    9 +++++
 2 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/drm-i915-Use-cpu-relocations-if-the-object-is-in-the.patch b/drm-i915-Use-cpu-relocations-if-the-object-is-in-the.patch
new file mode 100644
index 0000000..0e282bf
--- /dev/null
+++ b/drm-i915-Use-cpu-relocations-if-the-object-is-in-the.patch
@@ -0,0 +1,33 @@
+From 504c7267a1e84b157cbd7e9c1b805e1bc0c2c846 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris at chris-wilson.co.uk>
+Date: Thu, 23 Aug 2012 13:12:52 +0100
+Subject: [PATCH] drm/i915: Use cpu relocations if the object is in the GTT
+ but not mappable
+
+This prevents the case of unbinding the object in order to process the
+relocations through the GTT and then rebinding it only to then proceed
+to use cpu relocations as the object is now in the CPU write domain. By
+choosing to use cpu relocations up front, we can therefore avoid the
+rebind penalty.
+
+Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
+---
+ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+index f7346d8..dc87563 100644
+--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
++++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+@@ -95,6 +95,7 @@ eb_destroy(struct eb_objects *eb)
+ static inline int use_cpu_reloc(struct drm_i915_gem_object *obj)
+ {
+ 	return (obj->base.write_domain == I915_GEM_DOMAIN_CPU ||
++		!obj->map_and_fenceable ||
+ 		obj->cache_level != I915_CACHE_NONE);
+ }
+ 
+-- 
+1.7.12.1
+
diff --git a/kernel.spec b/kernel.spec
index 6c25a47..51f7da6 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -699,6 +699,9 @@ Patch22076: fix-stack-memory-content-leak-via-UNAME26.patch
 #rhbz 867344
 Patch22077: dont-call-cifs_lookup-on-hashed-negative-dentry.patch
 
+#rhbz 852210
+Patch22078: drm-i915-Use-cpu-relocations-if-the-object-is-in-the.patch
+
 # Debug patches
 Patch30000: weird-root-dentry-name-debug.patch
 Patch30010: debug-808990.patch
@@ -1323,6 +1326,9 @@ ApplyPatch fix-stack-memory-content-leak-via-UNAME26.patch
 #rhbz 867344
 ApplyPatch dont-call-cifs_lookup-on-hashed-negative-dentry.patch
 
+#rhbz 852210
+ApplyPatch drm-i915-Use-cpu-relocations-if-the-object-is-in-the.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2023,6 +2029,9 @@ fi
 # and build.
 
 %changelog
+* Wed Oct 24 2012 Josh Boyer <jwboyer at redhat.com>
+- Add patch to fix corrupted text with i915 (rhbz 852210)
+
 * Mon Oct 22 2012 Josh Boyer <jwboyer at redhat.com>
 - Add patch to fix CIFS oops from Jeff Layton (rhbz 867344)
 - CVE-2012-0957: uts: stack memory leak in UNAME26 (rhbz 862877 864824)


More information about the scm-commits mailing list