public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] linux-patches r1592 - genpatches-2.6/trunk/2.6.30
@ 2009-07-25  1:04 Mike Pagano (mpagano)
  0 siblings, 0 replies; only message in thread
From: Mike Pagano (mpagano) @ 2009-07-25  1:04 UTC (permalink / raw
  To: gentoo-commits

Author: mpagano
Date: 2009-07-25 01:04:29 +0000 (Sat, 25 Jul 2009)
New Revision: 1592

Added:
   genpatches-2.6/trunk/2.6.30/2700_init-fence-regs-to-zero-on-GEM-load.patch
Modified:
   genpatches-2.6/trunk/2.6.30/0000_README
Log:
MacBook display corruption fix

Modified: genpatches-2.6/trunk/2.6.30/0000_README
===================================================================
--- genpatches-2.6/trunk/2.6.30/0000_README	2009-07-25 00:38:04 UTC (rev 1591)
+++ genpatches-2.6/trunk/2.6.30/0000_README	2009-07-25 01:04:29 UTC (rev 1592)
@@ -55,6 +55,10 @@
 From:	http://bugs.gentoo.org/show_bug.cgi?id=274182
 Desc:	ide-cd: handle fragmented packet commands gracefully
 
+Patch:	2700_init-fence-regs-to-zero-on-GEM-load.patch
+From:	http://bugs.gentoo.org/show_bug.cgi?id=269554
+Desc:	drm/i915: initialize fence registers to zero when loading GEM
+
 Patch:	2900_makefile-no-delete-null-pointer-checks-fix.patch
 From:	http://www.kernel.org
 Desc:	Add compiler flag to not remove useless null ptr checks on optimization

Added: genpatches-2.6/trunk/2.6.30/2700_init-fence-regs-to-zero-on-GEM-load.patch
===================================================================
--- genpatches-2.6/trunk/2.6.30/2700_init-fence-regs-to-zero-on-GEM-load.patch	                        (rev 0)
+++ genpatches-2.6/trunk/2.6.30/2700_init-fence-regs-to-zero-on-GEM-load.patch	2009-07-25 01:04:29 UTC (rev 1592)
@@ -0,0 +1,50 @@
+From: Grégoire Henry <Gregoire.Henry@pps.jussieu.fr>
+Date: Tue, 23 Jun 2009 13:41:02 +0000 (+0200)
+Subject: drm/i915: initialize fence registers to zero when loading GEM
+X-Git-Tag: v2.6.31-rc2~85^2~1^2
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=b5aa8a0fc132dd512c33e7c2621d075e3b77a65e
+
+drm/i915: initialize fence registers to zero when loading GEM
+
+Unitialized fence register could leads to corrupted display. Problem
+encountered on MacBooks (revision 1 and 2), directly booting from EFI
+or through BIOS emulation.
+
+(bug #21710 at freedestop.org)
+
+Signed-off-by: Grégoire Henry <henry@pps.jussieu.fr>
+Signed-off-by: Eric Anholt <eric@anholt.net>
+---
+
+diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
+index 8660b21..876b65c 100644
+--- a/drivers/gpu/drm/i915/i915_gem.c
++++ b/drivers/gpu/drm/i915/i915_gem.c
+@@ -4227,6 +4227,7 @@ i915_gem_lastclose(struct drm_device *dev)
+ void
+ i915_gem_load(struct drm_device *dev)
+ {
++	int i;
+ 	drm_i915_private_t *dev_priv = dev->dev_private;
+ 
+ 	spin_lock_init(&dev_priv->mm.active_list_lock);
+@@ -4246,6 +4247,18 @@ i915_gem_load(struct drm_device *dev)
+ 	else
+ 		dev_priv->num_fence_regs = 8;
+ 
++	/* Initialize fence registers to zero */
++	if (IS_I965G(dev)) {
++		for (i = 0; i < 16; i++)
++			I915_WRITE64(FENCE_REG_965_0 + (i * 8), 0);
++	} else {
++		for (i = 0; i < 8; i++)
++			I915_WRITE(FENCE_REG_830_0 + (i * 4), 0);
++		if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))
++			for (i = 0; i < 8; i++)
++				I915_WRITE(FENCE_REG_945_8 + (i * 4), 0);
++	}
++
+ 	i915_gem_detect_bit_6_swizzle(dev);
+ }
+ 
+




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-25  1:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-25  1:04 [gentoo-commits] linux-patches r1592 - genpatches-2.6/trunk/2.6.30 Mike Pagano (mpagano)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox