rpms/kernel/F-13 drm-i915-add-reclaimable-to-page-allocations.patch, NONE, 1.1.2.2 drm-i915-make-G4X-style-PLL-search-more-permissive.patch, NONE, 1.1.2.2 drm-intel-945gm-stability-fixes.patch, NONE, 1.1.2.2 drm-radeon-fix-shared-ddc-handling.patch, NONE, 1.1.2.2 kernel.spec, 1.2084.2.2, 1.2084.2.3

Chuck Ebbert cebbert at fedoraproject.org
Fri Jul 23 16:44:56 UTC 2010


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv6654

Modified Files:
      Tag: private-f13-2_6_33
	kernel.spec 
Added Files:
      Tag: private-f13-2_6_33
	drm-i915-add-reclaimable-to-page-allocations.patch 
	drm-i915-make-G4X-style-PLL-search-more-permissive.patch 
	drm-intel-945gm-stability-fixes.patch 
	drm-radeon-fix-shared-ddc-handling.patch 
Log Message:
drm-i915-add-reclaimable-to-page-allocations.patch:
  Additional fix for hibernation memory corruption bugs.
drm-intel-945gm-stability-fixes.patch: fix 945GM stability issues
drm-i915-make-G4X-style-PLL-search-more-permissive.patch (#572799)
drm-radeon-fix-shared-ddc-handling.patch (#593429)

drm-i915-add-reclaimable-to-page-allocations.patch:
 i915_gem.c |    1 +
 1 file changed, 1 insertion(+)

--- NEW FILE drm-i915-add-reclaimable-to-page-allocations.patch ---
From: Linus Torvalds <torvalds at linux-foundation.org>
Date: Sun, 18 Jul 2010 16:44:37 +0000 (-0700)
Subject: drm/i915: add 'reclaimable' to i915 self-reclaimable page allocations
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=cd9f040df6ce46573760a507cb88192d05d27d86

drm/i915: add 'reclaimable' to i915 self-reclaimable page allocations

The hibernate issues that got fixed in commit 985b823b9192 ("drm/i915:
fix hibernation since i915 self-reclaim fixes") turn out to have been
incomplete.  Vefa Bicakci tested lots of hibernate cycles, and without
the __GFP_RECLAIMABLE flag the system eventually fails to resume.

With the flag added, Vefa can apparently hibernate forever (or until he
gets bored running his automated scripts, whichever comes first).

The reclaimable flag was there originally, and was one of the flags that
were dropped (unintentionally) by commit 4bdadb978569 ("drm/i915:
Selectively enable self-reclaim") that introduced all these problems,
but I didn't want to just blindly add back all the flags in commit
985b823b9192, and it looked like __GFP_RECLAIM wasn't necessary.  It
clearly was.

I still suspect that there is some subtle reason we're missing that
causes the problems, but __GFP_RECLAIMABLE is certainly not wrong to use
in this context, and is what the code historically used.  And we have no
idea what the causes the corruption without it.

Reported-and-tested-by: M. Vefa Bicakci <bicave at superonline.com>
Cc: Dave Airlie <airlied at gmail.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: KOSAKI Motohiro <kosaki.motohiro at jp.fujitsu.com>
Cc: Hugh Dickins <hugh.dickins at tiscali.co.uk>
Cc: stable at kernel.org
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0743858..8757ecf 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2241,6 +2241,7 @@ i915_gem_object_get_pages(struct drm_gem_object *obj,
 		page = read_cache_page_gfp(mapping, i,
 					   GFP_HIGHUSER |
 					   __GFP_COLD |
+					   __GFP_RECLAIMABLE |
 					   gfpmask);
 		if (IS_ERR(page))
 			goto err_pages;

drm-i915-make-G4X-style-PLL-search-more-permissive.patch:
 intel_display.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- NEW FILE drm-i915-make-G4X-style-PLL-search-more-permissive.patch ---
drm/i915: Make G4X-style PLL search more permissive

Fixes an Ironlake laptop with a 68.940MHz 1280x800 panel and 120MHz SSC
reference clock.

More generally, the 0.488% tolerance used before is just too tight to
reliably find a PLL setting.  I extracted the search algorithm and
modified it to find the dot clocks with maximum error over the valid
range for the given output type:

http://people.freedesktop.org/~ajax/intel_g4x_find_best_pll.c

This gave:

Worst dotclock for Ironlake DAC refclk is 350000kHz (error 0.00571)
Worst dotclock for Ironlake SL-LVDS refclk is 102321kHz (error 0.00524)
Worst dotclock for Ironlake DL-LVDS refclk is 219642kHz (error 0.00488)
Worst dotclock for Ironlake SL-LVDS SSC refclk is 84374kHz (error 0.00529)
Worst dotclock for Ironlake DL-LVDS SSC refclk is 183035kHz (error 0.00488)
Worst dotclock for G4X SDVO refclk is 50000kHz (error 0.17332)
Worst dotclock for G4X HDMI refclk is 334400kHz (error 0.00478)
Worst dotclock for G4X SL-LVDS refclk is 95571kHz (error 0.00449)
Worst dotclock for G4X DL-LVDS refclk is 224000kHz (error 0.00510)

The SDVO number looks a bit suspicious, which I haven't tracked down
yet.  But it's clear that the old threshold is too tight.

Signed-off-by: Adam Jackson <ajax at redhat.com>
[ RHBZ #572799 ]
---
 drivers/gpu/drm/i915/intel_display.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a8d65b7..4b17722 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -862,8 +862,8 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
 	intel_clock_t clock;
 	int max_n;
 	bool found;
-	/* approximately equals target * 0.00488 */
-	int err_most = (target >> 8) + (target >> 10);
+	/* approximately equals target * 0.00585 */
+	int err_most = (target >> 8) + (target >> 9);
 	found = false;
 
 	if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
-- 
1.7.1


drm-intel-945gm-stability-fixes.patch:
 i915_gem.c |   10 +++++++++
 i915_reg.h |   65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 74 insertions(+), 1 deletion(-)

--- NEW FILE drm-intel-945gm-stability-fixes.patch ---
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0d05c6f..b87f65d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4967,6 +4967,16 @@ i915_gem_load(struct drm_device *dev)
 	list_add(&dev_priv->mm.shrink_list, &shrink_list);
 	spin_unlock(&shrink_list_lock);
 
+	/* On GEN3 we really need to make sure the ARB C3 LP bit is set */
+	if (IS_GEN3(dev)) {
+		u32 tmp = I915_READ(MI_ARB_STATE);
+		if (!(tmp & MI_ARB_C3_LP_WRITE_ENABLE)) {
+			/* arb state is a masked write, so set bit + bit in mask */
+			tmp = MI_ARB_C3_LP_WRITE_ENABLE | (MI_ARB_C3_LP_WRITE_ENABLE << MI_ARB_MASK_SHIFT);
+			I915_WRITE(MI_ARB_STATE, tmp);
+		}
+	}
+
 	/* Old X drivers will take 0-2 for front, back, depth buffers */
 	if (!drm_core_check_feature(dev, DRIVER_MODESET))
 		dev_priv->fence_reg_start = 3;
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 4cbc521..4543975 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -357,6 +357,70 @@
 #define LM_BURST_LENGTH     0x00000700
 #define LM_FIFO_WATERMARK   0x0000001F
 #define MI_ARB_STATE	0x020e4 /* 915+ only */
+#define   MI_ARB_MASK_SHIFT	  16	/* shift for enable bits */
+
+/* Make render/texture TLB fetches lower priorty than associated data
+ *   fetches. This is not turned on by default
+ */
+#define   MI_ARB_RENDER_TLB_LOW_PRIORITY	(1 << 15)
+
+/* Isoch request wait on GTT enable (Display A/B/C streams).
+ * Make isoch requests stall on the TLB update. May cause
+ * display underruns (test mode only)
+ */
+#define   MI_ARB_ISOCH_WAIT_GTT			(1 << 14)
+
+/* Block grant count for isoch requests when block count is
+ * set to a finite value.
+ */
+#define   MI_ARB_BLOCK_GRANT_MASK		(3 << 12)
+#define   MI_ARB_BLOCK_GRANT_8			(0 << 12)	/* for 3 display planes */
+#define   MI_ARB_BLOCK_GRANT_4			(1 << 12)	/* for 2 display planes */
+#define   MI_ARB_BLOCK_GRANT_2			(2 << 12)	/* for 1 display plane */
+#define   MI_ARB_BLOCK_GRANT_0			(3 << 12)	/* don't use */
+
+/* Enable render writes to complete in C2/C3/C4 power states.
+ * If this isn't enabled, render writes are prevented in low
+ * power states. That seems bad to me.
+ */
+#define   MI_ARB_C3_LP_WRITE_ENABLE		(1 << 11)
+
+/* This acknowledges an async flip immediately instead
+ * of waiting for 2TLB fetches.
+ */
+#define   MI_ARB_ASYNC_FLIP_ACK_IMMEDIATE	(1 << 10)
+
+/* Enables non-sequential data reads through arbiter
+ */
+#define   MI_ARB_DUAL_DATA_PHASE_DISABLE       	(1 << 9)
+
+/* Disable FSB snooping of cacheable write cycles from binner/render
+ * command stream
+ */
+#define   MI_ARB_CACHE_SNOOP_DISABLE		(1 << 8)
+
+/* Arbiter time slice for non-isoch streams */
+#define   MI_ARB_TIME_SLICE_MASK		(7 << 5)
+#define   MI_ARB_TIME_SLICE_1			(0 << 5)
+#define   MI_ARB_TIME_SLICE_2			(1 << 5)
+#define   MI_ARB_TIME_SLICE_4			(2 << 5)
+#define   MI_ARB_TIME_SLICE_6			(3 << 5)
+#define   MI_ARB_TIME_SLICE_8			(4 << 5)
+#define   MI_ARB_TIME_SLICE_10			(5 << 5)
+#define   MI_ARB_TIME_SLICE_14			(6 << 5)
+#define   MI_ARB_TIME_SLICE_16			(7 << 5)
+
+/* Low priority grace period page size */
+#define   MI_ARB_LOW_PRIORITY_GRACE_4KB		(0 << 4)	/* default */
+#define   MI_ARB_LOW_PRIORITY_GRACE_8KB		(1 << 4)
+
+/* Disable display A/B trickle feed */
+#define   MI_ARB_DISPLAY_TRICKLE_FEED_DISABLE	(1 << 2)
+
+/* Set display plane priority */
+#define   MI_ARB_DISPLAY_PRIORITY_A_B		(0 << 0)	/* display A > display B */
+#define   MI_ARB_DISPLAY_PRIORITY_B_A		(1 << 0)	/* display B > display A */
+
 #define CACHE_MODE_0	0x02120 /* 915+ only */
 #define   CM0_MASK_SHIFT          16
 #define   CM0_IZ_OPT_DISABLE      (1<<6)
-- 
1.7.1


drm-radeon-fix-shared-ddc-handling.patch:
 radeon_connectors.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- NEW FILE drm-radeon-fix-shared-ddc-handling.patch ---
>From 557b452536c9390105539a264d342d963d71b087 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeucher at gmail.com>
Date: Mon, 21 Jun 2010 12:07:52 -0400
Subject: [PATCH] drm/radeon/kms: fix shared ddc handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Connectors with a shared ddc line can be connected to different
encoders.

Reported by Pasi Kärkkäinen <pasik at iki.fi> on dri-devel

Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
---
 drivers/gpu/drm/radeon/radeon_connectors.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 0c7ccc6..f58f8bd 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -785,7 +785,9 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect
 					if (connector == list_connector)
 						continue;
 					list_radeon_connector = to_radeon_connector(list_connector);
-					if (radeon_connector->devices == list_radeon_connector->devices) {
+					if (list_radeon_connector->shared_ddc &&
+					    (list_radeon_connector->ddc_bus->rec.i2c_id ==
+					     radeon_connector->ddc_bus->rec.i2c_id)) {
 						if (drm_detect_hdmi_monitor(radeon_connector->edid)) {
 							if (connector->connector_type == DRM_MODE_CONNECTOR_DVID) {
 								kfree(radeon_connector->edid);
-- 
1.7.0.1



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-13/kernel.spec,v
retrieving revision 1.2084.2.2
retrieving revision 1.2084.2.3
diff -u -p -r1.2084.2.2 -r1.2084.2.3
--- kernel.spec	23 Jul 2010 16:03:35 -0000	1.2084.2.2
+++ kernel.spec	23 Jul 2010 16:44:55 -0000	1.2084.2.3
@@ -710,8 +710,6 @@ Patch1558: vhost_net-rollup2.patch
 # EC2 is running old xen hosts and wont upgrade so we have to work around it
 Patch1559: fix_xen_guest_on_old_EC2.patch
 
-
-
 # fbdev x86-64 primary fix
 Patch1700: linux-2.6-x86-64-fbdev-primary.patch
 
@@ -720,11 +718,12 @@ Patch1800: drm-core-next.patch
 Patch1801: drm-1024x768-85.patch
 
 # radeon kms backport
-Patch1810: drm-radeon-evergreen.patch
-Patch1811: drm-radeon-firemv-pciid.patch
-Patch1812: drm-radeon-kms-fix-dual-link-dvi.patch
-Patch1813: drm-radeon-fix-rs600-tlb.patch
-Patch1814: drm-radeon-ss-fix.patch
+Patch1808: drm-radeon-evergreen.patch
+Patch1809: drm-radeon-firemv-pciid.patch
+Patch1810: drm-radeon-kms-fix-dual-link-dvi.patch
+Patch1811: drm-radeon-fix-rs600-tlb.patch
+Patch1812: drm-radeon-ss-fix.patch
+Patch1813: drm-radeon-fix-shared-ddc-handling.patch
 # nouveau fixes
 # - these not until 2.6.34
 Patch1815: drm-nouveau-abi16.patch
@@ -751,6 +750,9 @@ Patch1840: drm-i915-use-pipe_control-ins
 Patch1841: drm-i915-fix-non-ironlake-965-class-crashes.patch
 Patch1842: drm-i915-fix-edp-panels.patch
 Patch1843: drm-i915-fix-hibernate-memory-corruption.patch
+Patch1844: drm-i915-add-reclaimable-to-page-allocations.patch
+Patch1845: drm-i915-make-G4X-style-PLL-search-more-permissive.patch
+Patch1846: drm-intel-945gm-stability-fixes.patch
 
 Patch2100: linux-2.6-phylib-autoload.patch
 
@@ -1470,6 +1472,7 @@ ApplyPatch drm-radeon-firemv-pciid.patch
 ApplyPatch drm-radeon-kms-fix-dual-link-dvi.patch
 ApplyPatch drm-radeon-fix-rs600-tlb.patch
 ApplyPatch drm-radeon-ss-fix.patch
+ApplyPatch drm-radeon-fix-shared-ddc-handling.patch
 ApplyPatch drm-nouveau-abi16.patch
 ApplyPatch drm-nouveau-updates.patch
 ApplyPatch drm-nouveau-acpi-edid-fallback.patch
@@ -1486,7 +1489,14 @@ ApplyPatch drm-intel-sdvo-fix-2.patch
 ApplyPatch drm-i915-use-pipe_control-instruction-on-ironlake-and-sandy-bridge.patch
 ApplyPatch drm-i915-fix-non-ironlake-965-class-crashes.patch
 ApplyPatch drm-i915-fix-edp-panels.patch
+# hibernation memory corruption fixes
 ApplyPatch drm-i915-fix-hibernate-memory-corruption.patch
+ApplyPatch drm-i915-add-reclaimable-to-page-allocations.patch
+
+# RHBZ#572799
+ApplyPatch drm-i915-make-G4X-style-PLL-search-more-permissive.patch
+
+ApplyPatch drm-intel-945gm-stability-fixes.patch
 
 ApplyPatch linux-2.6-phylib-autoload.patch
 
@@ -2237,6 +2247,13 @@ fi
 
 
 %changelog
+* Fri Jul 23 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.33.6-147.2.3
+- drm-i915-add-reclaimable-to-page-allocations.patch:
+  Additional fix for hibernation memory corruption bugs.
+- drm-intel-945gm-stability-fixes.patch: fix 945GM stability issues
+- drm-i915-make-G4X-style-PLL-search-more-permissive.patch (#572799)
+- drm-radeon-fix-shared-ddc-handling.patch (#593429)
+
 * Fri Jul 23 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.33.6-147.2.2
 - kvm-mmu-fix-conflict-access-permissions-in-direct-sp.patch:
   Fix crash in guest Python programs (#610911)



More information about the scm-commits mailing list