On Sat, Oct 18, 2008 at 11:47:48 +0200, Julien Cristau wrote:

> The kernel patch is now in mainline, commit id
> 82e14a6215cbc9804ecc35281e973c6c8ce22fe7 (attached).
> 
Doesn't apply as-is because 2.6.26 is missing 'intel_agp: official name
for GM45 chipset' (99d32bd5c7b1caa05d1fe3c89b08aabd459bc12a).  Is the
attached patch ok (it seems to apply fine)?

Cheers,
Julien
Index: changelog
===================================================================
--- changelog	(revision 12346)
+++ changelog	(working copy)
@@ -1,3 +1,10 @@
+linux-2.6 (2.6.26-10) UNRELEASED; urgency=low
+
+  * intel_agp: official name for GM45 chipset
+  * agp: Fix stolen memory counting on G4X (closes: #502606).
+
+ -- Julien Cristau <[EMAIL PROTECTED]>  Sat, 18 Oct 2008 16:46:28 +0200
+
 linux-2.6 (2.6.26-9) unstable; urgency=low
 
   [ Bastian Blank ]
Index: patches/bugfix/x86/agp-Fix-stolen-memory-counting-on-G4X.patch
===================================================================
--- patches/bugfix/x86/agp-Fix-stolen-memory-counting-on-G4X.patch	(revision 0)
+++ patches/bugfix/x86/agp-Fix-stolen-memory-counting-on-G4X.patch	(revision 0)
@@ -0,0 +1,60 @@
+From 82e14a6215cbc9804ecc35281e973c6c8ce22fe7 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <[EMAIL PROTECTED]>
+Date: Tue, 14 Oct 2008 11:28:58 -0700
+Subject: [PATCH] agp: Fix stolen memory counting on G4X.
+
+On the GM45, the amount of stolen memory mapped to the GTT was underestimated,
+even though we had 508KB more available since the GTT doesn't take from
+stolen memory. On the non-GM45 G4X, we overestimated how much stolen was
+mapped to the GTT by 4KB, resulting in GPU page faults when that page was
+accessed.
+
+This update requires a corresponding update to xf86-video-intel to work
+correctly.
+
+Signed-off-by: Eric Anholt <[EMAIL PROTECTED]>
+Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>
+---
+ drivers/char/agp/intel-agp.c |   12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
+index 016fdf0..f1fe749 100644
+--- a/drivers/char/agp/intel-agp.c
++++ b/drivers/char/agp/intel-agp.c
+@@ -54,8 +54,7 @@
+ 		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \
+ 		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \
+ 		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \
+-		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \
+-		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB)
++		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB)
+ 
+ #define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \
+ 		agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
+@@ -63,7 +62,8 @@
+ 
+ #define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_E_HB || \
+ 		agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \
+-		agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB)
++		agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \
++		agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB)
+ 
+ extern int agp_memory_reserved;
+ 
+@@ -525,8 +525,10 @@ static void intel_i830_init_gtt_entries(void)
+ 		size += 4;
+ 	} else if (IS_G4X) {
+ 		/* On 4 series hardware, GTT stolen is separate from graphics
+-		 * stolen, ignore it in stolen gtt entries counting */
+-		size = 0;
++		 * stolen, ignore it in stolen gtt entries counting.  However,
++		 * 4KB of the stolen memory doesn't get mapped to the GTT.
++		 */
++		size = 4;
+ 	} else {
+ 		/* On previous hardware, the GTT size was just what was
+ 		 * required to map the aperture.
+-- 
+1.5.6.5
+
Index: patches/bugfix/x86/intel_agp-official-name-for-GM45-chipset.patch
===================================================================
--- patches/bugfix/x86/intel_agp-official-name-for-GM45-chipset.patch	(revision 0)
+++ patches/bugfix/x86/intel_agp-official-name-for-GM45-chipset.patch	(revision 0)
@@ -0,0 +1,69 @@
+From 99d32bd5c7b1caa05d1fe3c89b08aabd459bc12a Mon Sep 17 00:00:00 2001
+From: Zhenyu Wang <[EMAIL PROTECTED]>
+Date: Wed, 30 Jul 2008 12:26:50 -0700
+Subject: [PATCH] intel_agp: official name for GM45 chipset
+
+Signed-off-by: Zhenyu Wang <[EMAIL PROTECTED]>
+Cc: Dave Airlie <[EMAIL PROTECTED]>
+Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
+Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>
+---
+ drivers/char/agp/intel-agp.c |   14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
+index df70264..e0d68aa 100644
+--- a/drivers/char/agp/intel-agp.c
++++ b/drivers/char/agp/intel-agp.c
+@@ -32,8 +32,8 @@
+ #define PCI_DEVICE_ID_INTEL_Q35_IG          0x29B2
+ #define PCI_DEVICE_ID_INTEL_Q33_HB          0x29D0
+ #define PCI_DEVICE_ID_INTEL_Q33_IG          0x29D2
+-#define PCI_DEVICE_ID_INTEL_IGD_HB          0x2A40
+-#define PCI_DEVICE_ID_INTEL_IGD_IG          0x2A42
++#define PCI_DEVICE_ID_INTEL_GM45_HB         0x2A40
++#define PCI_DEVICE_ID_INTEL_GM45_IG         0x2A42
+ #define PCI_DEVICE_ID_INTEL_IGD_E_HB        0x2E00
+ #define PCI_DEVICE_ID_INTEL_IGD_E_IG        0x2E02
+ #define PCI_DEVICE_ID_INTEL_Q45_HB          0x2E10
+@@ -55,7 +55,7 @@
+ 		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \
+ 		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \
+ 		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \
+-		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_HB)
++		 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB)
+ 
+ #define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \
+ 		agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
+@@ -1182,7 +1182,7 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge,
+ static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size)
+ {
+ 	switch (agp_bridge->dev->device) {
+-	case PCI_DEVICE_ID_INTEL_IGD_HB:
++	case PCI_DEVICE_ID_INTEL_GM45_HB:
+ 	case PCI_DEVICE_ID_INTEL_IGD_E_HB:
+ 	case PCI_DEVICE_ID_INTEL_Q45_HB:
+ 	case PCI_DEVICE_ID_INTEL_G45_HB:
+@@ -2117,8 +2117,8 @@ static const struct intel_driver_description {
+ 		NULL, &intel_g33_driver },
+ 	{ PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33",
+ 		NULL, &intel_g33_driver },
+-	{ PCI_DEVICE_ID_INTEL_IGD_HB, PCI_DEVICE_ID_INTEL_IGD_IG, 0,
+-	    "Intel Integrated Graphics Device", NULL, &intel_i965_driver },
++	{ PCI_DEVICE_ID_INTEL_GM45_HB, PCI_DEVICE_ID_INTEL_GM45_IG, 0,
++	    "Mobile Intel? GM45 Express", NULL, &intel_i965_driver },
+ 	{ PCI_DEVICE_ID_INTEL_IGD_E_HB, PCI_DEVICE_ID_INTEL_IGD_E_IG, 0,
+ 	    "Intel Integrated Graphics Device", NULL, &intel_i965_driver },
+ 	{ PCI_DEVICE_ID_INTEL_Q45_HB, PCI_DEVICE_ID_INTEL_Q45_IG, 0,
+@@ -2315,7 +2315,7 @@ static struct pci_device_id agp_intel_pci_table[] = {
+ 	ID(PCI_DEVICE_ID_INTEL_G33_HB),
+ 	ID(PCI_DEVICE_ID_INTEL_Q35_HB),
+ 	ID(PCI_DEVICE_ID_INTEL_Q33_HB),
+-	ID(PCI_DEVICE_ID_INTEL_IGD_HB),
++	ID(PCI_DEVICE_ID_INTEL_GM45_HB),
+ 	ID(PCI_DEVICE_ID_INTEL_IGD_E_HB),
+ 	ID(PCI_DEVICE_ID_INTEL_Q45_HB),
+ 	ID(PCI_DEVICE_ID_INTEL_G45_HB),
+-- 
+1.5.6.5
+
Index: patches/series/10
===================================================================
--- patches/series/10	(revision 0)
+++ patches/series/10	(revision 0)
@@ -0,0 +1,2 @@
++ bugfix/x86/intel_agp-official-name-for-GM45-chipset.patch
++ bugfix/x86/agp-Fix-stolen-memory-counting-on-G4X.patch

Reply via email to