Skip to contentSkip to conversation

intelfb: add (partial) support for 915G

PATCH In review Buttchereit, Axel (XL) 3 participants 7 messages Jan 29, 2005 – Feb 7, 2005 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intelfb: add (partial) support for 915G

Add (partial) support for 915G
No HW cursor at the moment
Screen is blanked but signal/sync is not switched off
Mostly derived from XFree86/Xorg driver
Pass "vesa_modes" and VESA_MODEDB_SIZE in call to "fb_find_mode()"
to allow loading as module. Makes "vesa_modes" also the default "modedb" when linking statically into the kernel.
Change PREFERRED_MODE to more reasonable value "1024x768-32@70"

drivers/video/intelfb/intelfbdrv.c +21 -9
diff -ru linux.orig/drivers/video/intelfb/intelfbdrv.c linux/drivers/video/intelfb/intelfbdrv.c
@@ -1,7 +1,7 @@
 /*
  * intelfb
  *
- * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G
+ * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G
  * integrated graphics chips.
  *
  * Copyright © 2002, 2003 David Dawes <[email protected]>
@@ -153,6 +153,7 @@
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G },
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM },
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_865G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_865G },
+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_915G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_915G },
 	{ 0, }
 };
 
@@ -470,6 +471,8 @@
 	struct agp_kern_info gtt_info;
 	int agp_memtype;
 	const char *s;
+	int aperture_bar = 0;
+	int mmio_bar = 1;
 
 	DBG_MSG("intelfb_pci_register\n");
 
@@ -516,13 +519,20 @@
 	}
 
 	/* Set base addresses. */
-	dinfo->aperture.physical = pci_resource_start(pdev, 0);
-	dinfo->aperture.size     = pci_resource_len(pdev, 0);
-	dinfo->mmio_base_phys    = pci_resource_start(pdev, 1);
-
+	if (ent->device == PCI_DEVICE_ID_INTEL_915G) {
+		aperture_bar = 2;
+		mmio_bar = 0;
+		/* Disable HW cursor on 915G (not implemented yet) */
+		hwcursor = 0;
+	}
+	dinfo->aperture.physical = pci_resource_start(pdev, aperture_bar);
+	dinfo->aperture.size     = pci_resource_len(pdev, aperture_bar);
+	dinfo->mmio_base_phys    = pci_resource_start(pdev, mmio_bar);
 	DBG_MSG("fb aperture: 0x%lx/0x%lx, MMIO region: 0x%lx/0x%lx\n",
-		pci_resource_start(pdev, 0), pci_resource_len(pdev, 0),
-		pci_resource_start(pdev, 1), pci_resource_len(pdev, 1));
+		pci_resource_start(pdev, aperture_bar),
+		pci_resource_len(pdev, aperture_bar),
+		pci_resource_start(pdev, mmio_bar),
+		pci_resource_len(pdev, mmio_bar));
 
 	/* Reserve the fb and MMIO regions */
 	if (!request_mem_region(dinfo->aperture.physical, dinfo->aperture.size,
@@ -989,13 +999,15 @@
 	} else {
 		if (mode) {
 			msrc = fb_find_mode(var, dinfo->info, mode,
-					    NULL, 0, NULL, 0);
+					    vesa_modes, VESA_MODEDB_SIZE,
+					    NULL, 0);
 			if (msrc)
 				msrc |= 8;
 		}
 		if (!msrc) {
 			msrc = fb_find_mode(var, dinfo->info, PREFERRED_MODE,
-					    NULL, 0, NULL, 0);
+					    vesa_modes, VESA_MODEDB_SIZE,
+					    NULL, 0);
 		}
 	}
 
drivers/video/intelfb/intelfbdrv.h +1 -1
diff -ru linux.orig/drivers/video/intelfb/intelfbdrv.h linux/drivers/video/intelfb/intelfbdrv.h
@@ -5,7 +5,7 @@
  ******************************************************************************
  * intelfb
  *
- * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G
+ * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G
  * integrated graphics chips.
  *
  * Copyright © 2004 Sylvain Meyer
drivers/video/intelfb/intelfb.h +5 -3
diff -ru linux.orig/drivers/video/intelfb/intelfb.h linux/drivers/video/intelfb/intelfb.h
@@ -10,7 +10,7 @@
 /*** Version/name ***/
 #define INTELFB_VERSION			"0.9.2"
 #define INTELFB_MODULE_NAME		"intelfb"
-#define SUPPORTED_CHIPSETS		"830M/845G/852GM/855GM/865G"
+#define SUPPORTED_CHIPSETS		"830M/845G/852GM/855GM/865G/915G"
 
 
 /*** Debug/feature defines ***/
@@ -36,7 +36,7 @@
 #endif
 
 #ifndef PREFERRED_MODE
-#define PREFERRED_MODE			"1024x768-16@60"
+#define PREFERRED_MODE			"1024x768-32@70"
 #endif
 
 /*** hw-related values ***/
@@ -46,6 +46,7 @@
 #define PCI_DEVICE_ID_INTEL_845G	0x2562
 #define PCI_DEVICE_ID_INTEL_85XGM	0x3582
 #define PCI_DEVICE_ID_INTEL_865G	0x2572
+#define PCI_DEVICE_ID_INTEL_915G	0x2582
 
 /* Size of MMIO region */
 #define INTEL_REG_SIZE			0x80000
@@ -117,7 +118,8 @@
 	INTEL_852GME,
 	INTEL_855GM,
 	INTEL_855GME,
-	INTEL_865G
+	INTEL_865G,
+	INTEL_915G
 };
 
 struct intelfb_hwstate {
drivers/video/intelfb/intelfbhw.c +11 -0
diff -ru linux.orig/drivers/video/intelfb/intelfbhw.c linux/drivers/video/intelfb/intelfbhw.c
@@ -98,6 +98,11 @@
 		*chipset = INTEL_865G;
 		*mobile = 0;
 		return 0;
+	case PCI_DEVICE_ID_INTEL_915G:
+		*name = "Intel(R) 915G";
+		*chipset = INTEL_915G;
+		*mobile = 0;
+		return 0;
 	default:
 		return 1;
 	}
@@ -169,6 +174,12 @@
 		case INTEL_855_GMCH_GMS_STOLEN_32M:
 			*stolen_size = MB(32) - KB(132);
 			return 0;
+		case INTEL_915G_GMCH_GMS_STOLEN_48M:
+			*stolen_size = MB(48) - KB(132);
+			return 0;
+		case INTEL_915G_GMCH_GMS_STOLEN_64M:
+			*stolen_size = MB(64) - KB(132);
+			return 0;
 		case INTEL_855_GMCH_GMS_DISABLED:
 			ERR_MSG("video memory is disabled\n");
 			return 0;
drivers/video/intelfb/intelfbhw.h +3 -0
diff -ru linux.orig/drivers/video/intelfb/intelfbhw.h linux/drivers/video/intelfb/intelfbhw.h
@@ -46,6 +46,9 @@
 #define INTEL_855_GMCH_GMS_STOLEN_16M	(0x4 << 4)
 #define INTEL_855_GMCH_GMS_STOLEN_32M	(0x5 << 4)
 
+#define INTEL_915G_GMCH_GMS_STOLEN_48M	(0x6 << 4)
+#define INTEL_915G_GMCH_GMS_STOLEN_64M	(0x7 << 4)
+
 /* HW registers */
 
 /* Fence registers */

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl

#1 lore raw
Quoted 3 lines · Axel (XL)

Add (partial) support for 915G
No HW cursor at the moment
Screen is blanked but signal/sync is not switched off

Is the driver usable? If not, make it work with your machine at least.

Tony

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl

#2 lore raw
Quoted 9 lines · Antonino A. Daplas
Quoted 3 lines · Axel (XL)

Add (partial) support for 915G
No HW cursor at the moment
Screen is blanked but signal/sync is not switched off

Is the driver usable? If not, make it work with your machine at least.

The driver works with my machine. Both as a module and statically linked.

Support is partial/incomplete, because
- hwcursor does not work, i. e. I haven't managed yet to derive the special code for hwcursor on 915G from the XFree86/Xorg-code. That is why I'm hard-wiring the value of hwcusror to "0" on 915G.
- DPMS does nor work properly, but I do not know whether this is because of my incomplete patch, because of my hardware or because of the kernel (version).

Furthermore I think that support for the mobila variant 915GM, should be inlcuded, but I haven't got the hardware.

I would be happy to get feedback from a user that has tried the patched and the unpatched "intelfb" with current 2.6.10 on 830/855/865 to see what is wrong with DPMS and from a user that has the 915GM.

The "final" patch should support "hwcusor", "DPMS" and 915GM.

Cheers
--Axel

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl

#3 lore raw
In reply to Buttchereit, Axel (XL)
Quoted 9 lines · Axel (XL)

Add (partial) support for 915G
No HW cursor at the moment
Screen is blanked but signal/sync is not switched off
Mostly derived from XFree86/Xorg driver
Pass "vesa_modes" and VESA_MODEDB_SIZE in call to "fb_find_mode()"
to allow loading as module. Makes "vesa_modes" also the default "modedb" when linking statically into the kernel.
Change PREFERRED_MODE to more reasonable value "1024x768-32@70"

Can you resend? Patch is malformed.

Tony

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl

#4 lore raw
Quoted 13 lines · Antonino A. Daplas
Quoted 9 lines · Axel (XL)

Add (partial) support for 915G
No HW cursor at the moment
Screen is blanked but signal/sync is not switched off
Mostly derived from XFree86/Xorg driver
Pass "vesa_modes" and VESA_MODEDB_SIZE in call to "fb_find_mode()"
to allow loading as module. Makes "vesa_modes" also the default "modedb" when linking statically into the kernel.
Change PREFERRED_MODE to more reasonable value "1024x768-32@70"

Quoted 1 line

Can you resend? Patch is malformed.

Sure!
But it would be much easier for me, if I know what's wrong with my patch.

I assume that the kernel source version I was using is wrong (outdated), i. e. I have to make my patch base on (at least) version 2.6.11-rc2.

I would like to know, if the following statements are true:

@2.6.10 = kernel/v2.6/linux-2.6.10.tar.bz2
@2.6.11-rc1 = @2.6.10 + kernel/v2.6/testing/patch-2.6.11-rc1.bz2
@2.6.11-rc2 = @2.6.10 + kernel/v2.6/testing/patch-2.6.11-rc2.bz2
@2.6.11-rc2-bk1 = @2.6.11-rc2 + kernel/v2.6/snapshots/patch-2.6.11-rc2-bk1.bz2
@2.6.11-rc2-bk2 = @2.6.11-rc2 + kernel/v2.6/snapshots/patch-2.6.11-rc2-bk2.bz2
...
@2.6.11-rc1-mm1 = @2.6.11-rc1 + kernel/people/akpm/patches/2.6/2.6.11-rc1/2.6.11-rc1-mm1/2.6.11-rc1-mm1.bz2
@2.6.11-rc1-mm2 = @2.6.11-rc1 + kernel/people/akpm/patches/2.6/2.6.11-rc1/2.6.11-rc1-mm2/2.6.11-rc1-mm2.bz2
@2.6.11-rc2-mm1 = @2.6.11-rc2 + kernel/people/akpm/patches/2.6/2.6.11-rc2/2.6.11-rc2-mm1/2.6.11-rc2-mm1.bz2
@2.6.11-rc2-mm2 = @2.6.11-rc2 + kernel/people/akpm/patches/2.6/2.6.11-rc2/2.6.11-rc2-mm2/2.6.11-rc2-mm2.bz2

The "2.6.11-rc[V]-bk[W]" are maintained by Linus who integrates patches from Andrews's mm-tree, i. e. "patch-2.6.11-rc[V]-bk[W]" is a subset (selected patches) from Andrew's current "2.6.11-rc2-mm[I]" patchset.

Right?
(What about the "-ac" patches? Are they also running into "2.6.11-rc[V]-bk[W]")

Thanks for your patience
--Axel

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl

#5 lore raw
Quoted 11 lines · Axel (XL)
Quoted 10 lines · Antonino A. Daplas
Quoted 8 lines · Axel (XL)

Add (partial) support for 915G
No HW cursor at the moment
Screen is blanked but signal/sync is not switched off
Mostly derived from XFree86/Xorg driver
Pass "vesa_modes" and VESA_MODEDB_SIZE in call to "fb_find_mode()"
to allow loading as module. Makes "vesa_modes" also the default "modedb" when linking statically into the kernel.
Change PREFERRED_MODE to more reasonable value "1024x768-32@70"

Quoted 4 lines
Quoted 1 line

Can you resend? Patch is malformed.

Sure!
But it would be much easier for me, if I know what's wrong with my patch.

It's line-wrapped, I think, your mailer probably mangled it. You can resend the patch as a text attachment.

Quoted 3 lines

I assume that the kernel source version I was using is wrong (outdated), i. e. I have to make my patch base on (at least) version 2.6.11-rc2.

The source tree is not a problem, you can use any kernel >= 2.6.10.

Tony

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl

#6 lore raw
Quoted 25 lines · Antonino A. Daplas
Quoted 13 lines · Axel (XL)
Quoted 11 lines · Antonino A. Daplas
Quoted 8 lines · Axel (XL)

Add (partial) support for 915G
No HW cursor at the moment
Screen is blanked but signal/sync is not switched off Mostly derived from XFree86/Xorg driver
Pass "vesa_modes" and VESA_MODEDB_SIZE in call to "fb_find_mode()" to allow loading as module. Makes "vesa_modes" also the default "modedb" when linking statically into the kernel. Change PREFERRED_MODE to more reasonable value "1024x768-32@70"

Quoted 4 lines
Quoted 1 line

Can you resend? Patch is malformed.

Sure!
But it would be much easier for me, if I know what's wrong with my patch.

It's line-wrapped, I think, your mailer probably mangled it. You can resend the patch as a text attachment.

Quoted 7 lines
Quoted 2 lines

I assume that the kernel source version I was using is wrong (outdated), i. e. I have to make my patch base on (at least) version 2.6.11-rc2.

The source tree is not a problem, you can use any kernel >= 2.6.10.

Tony

Sorry for my late response, but I was quite busy with "subversioning the kernel", i. e. I'm now able to (semi-)automatically update my subversion repository using (downloaded) patches from kernel.org (mirrors).

I have attached the same patch I've send before, though I do not understand why it was mangled. (I've tested this by sendind myself an email containing the patch...)

For the patch was build on 2.6.10 with gentoo-patches already applied, I have verified that my patch works on 2.6.11-rc3 from kernel.org, too. It works! (The patching, i. e. I've not built a 2.6.11-rc3-kernel yet)

Hope that I'm able to remove the "partial" soon.

Cheers,
Axel

Add (partial) support for 915G
No HW cursor at the moment
Screen is blanked but signal/sync is not switched off
Mostly derived from XFree86/Xorg driver
Pass "vesa_modes" and VESA_MODEDB_SIZE in call to "fb_find_mode()"
to allow loading as module. Makes "vesa_modes" also the default "modedb" when linking statically into the kernel.
Change PREFERRED_MODE to more reasonable value "1024x768-32@70"

drivers/video/intelfb/intelfbdrv.c +21 -9
diff -ru linux.orig/drivers/video/intelfb/intelfbdrv.c linux/drivers/video/intelfb/intelfbdrv.c
@@ -1,7 +1,7 @@
 /*
  * intelfb
  *
- * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G
+ * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G
  * integrated graphics chips.
  *
  * Copyright � 2002, 2003 David Dawes <[email protected]>
@@ -153,6 +153,7 @@
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G },
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM },
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_865G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_865G },
+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_915G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_915G },
 	{ 0, }
 };
 
@@ -470,6 +471,8 @@
 	struct agp_kern_info gtt_info;
 	int agp_memtype;
 	const char *s;
+	int aperture_bar = 0;
+	int mmio_bar = 1;
 
 	DBG_MSG("intelfb_pci_register\n");
 
@@ -516,13 +519,20 @@
 	}
 
 	/* Set base addresses. */
-	dinfo->aperture.physical = pci_resource_start(pdev, 0);
-	dinfo->aperture.size     = pci_resource_len(pdev, 0);
-	dinfo->mmio_base_phys    = pci_resource_start(pdev, 1);
-
+	if (ent->device == PCI_DEVICE_ID_INTEL_915G) {
+		aperture_bar = 2;
+		mmio_bar = 0;
+		/* Disable HW cursor on 915G (not implemented yet) */
+		hwcursor = 0;
+	}
+	dinfo->aperture.physical = pci_resource_start(pdev, aperture_bar);
+	dinfo->aperture.size     = pci_resource_len(pdev, aperture_bar);
+	dinfo->mmio_base_phys    = pci_resource_start(pdev, mmio_bar);
 	DBG_MSG("fb aperture: 0x%lx/0x%lx, MMIO region: 0x%lx/0x%lx\n",
-		pci_resource_start(pdev, 0), pci_resource_len(pdev, 0),
-		pci_resource_start(pdev, 1), pci_resource_len(pdev, 1));
+		pci_resource_start(pdev, aperture_bar),
+		pci_resource_len(pdev, aperture_bar),
+		pci_resource_start(pdev, mmio_bar),
+		pci_resource_len(pdev, mmio_bar));
 
 	/* Reserve the fb and MMIO regions */
 	if (!request_mem_region(dinfo->aperture.physical, dinfo->aperture.size,
@@ -989,13 +999,15 @@
 	} else {
 		if (mode) {
 			msrc = fb_find_mode(var, dinfo->info, mode,
-					    NULL, 0, NULL, 0);
+					    vesa_modes, VESA_MODEDB_SIZE,
+					    NULL, 0);
 			if (msrc)
 				msrc |= 8;
 		}
 		if (!msrc) {
 			msrc = fb_find_mode(var, dinfo->info, PREFERRED_MODE,
-					    NULL, 0, NULL, 0);
+					    vesa_modes, VESA_MODEDB_SIZE,
+					    NULL, 0);
 		}
 	}
 
drivers/video/intelfb/intelfbdrv.h +1 -1
diff -ru linux.orig/drivers/video/intelfb/intelfbdrv.h linux/drivers/video/intelfb/intelfbdrv.h
@@ -5,7 +5,7 @@
  ******************************************************************************
  * intelfb
  *
- * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G
+ * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G
  * integrated graphics chips.
  *
  * Copyright � 2004 Sylvain Meyer
drivers/video/intelfb/intelfb.h +5 -3
diff -ru linux.orig/drivers/video/intelfb/intelfb.h linux/drivers/video/intelfb/intelfb.h
@@ -10,7 +10,7 @@
 /*** Version/name ***/
 #define INTELFB_VERSION			"0.9.2"
 #define INTELFB_MODULE_NAME		"intelfb"
-#define SUPPORTED_CHIPSETS		"830M/845G/852GM/855GM/865G"
+#define SUPPORTED_CHIPSETS		"830M/845G/852GM/855GM/865G/915G"
 
 
 /*** Debug/feature defines ***/
@@ -36,7 +36,7 @@
 #endif
 
 #ifndef PREFERRED_MODE
-#define PREFERRED_MODE			"1024x768-16@60"
+#define PREFERRED_MODE			"1024x768-32@70"
 #endif
 
 /*** hw-related values ***/
@@ -46,6 +46,7 @@
 #define PCI_DEVICE_ID_INTEL_845G	0x2562
 #define PCI_DEVICE_ID_INTEL_85XGM	0x3582
 #define PCI_DEVICE_ID_INTEL_865G	0x2572
+#define PCI_DEVICE_ID_INTEL_915G	0x2582
 
 /* Size of MMIO region */
 #define INTEL_REG_SIZE			0x80000
@@ -117,7 +118,8 @@
 	INTEL_852GME,
 	INTEL_855GM,
 	INTEL_855GME,
-	INTEL_865G
+	INTEL_865G,
+	INTEL_915G
 };
 
 struct intelfb_hwstate {
drivers/video/intelfb/intelfbhw.c +11 -0
diff -ru linux.orig/drivers/video/intelfb/intelfbhw.c linux/drivers/video/intelfb/intelfbhw.c
@@ -98,6 +98,11 @@
 		*chipset = INTEL_865G;
 		*mobile = 0;
 		return 0;
+	case PCI_DEVICE_ID_INTEL_915G:
+		*name = "Intel(R) 915G";
+		*chipset = INTEL_915G;
+		*mobile = 0;
+		return 0;
 	default:
 		return 1;
 	}
@@ -169,6 +174,12 @@
 		case INTEL_855_GMCH_GMS_STOLEN_32M:
 			*stolen_size = MB(32) - KB(132);
 			return 0;
+		case INTEL_915G_GMCH_GMS_STOLEN_48M:
+			*stolen_size = MB(48) - KB(132);
+			return 0;
+		case INTEL_915G_GMCH_GMS_STOLEN_64M:
+			*stolen_size = MB(64) - KB(132);
+			return 0;
 		case INTEL_855_GMCH_GMS_DISABLED:
 			ERR_MSG("video memory is disabled\n");
 			return 0;
drivers/video/intelfb/intelfbhw.h +3 -0
diff -ru linux.orig/drivers/video/intelfb/intelfbhw.h linux/drivers/video/intelfb/intelfbhw.h
@@ -46,6 +46,9 @@
 #define INTEL_855_GMCH_GMS_STOLEN_16M	(0x4 << 4)
 #define INTEL_855_GMCH_GMS_STOLEN_32M	(0x5 << 4)
 
+#define INTEL_915G_GMCH_GMS_STOLEN_48M	(0x6 << 4)
+#define INTEL_915G_GMCH_GMS_STOLEN_64M	(0x7 << 4)
+
 /* HW registers */
 
 /* Fence registers */