aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorMaik Broemme <mbroemme@plusserver.de>2008-04-28 05:15:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:41 -0400
commit0e170c72c0c55bd78213a0f5053bd9a1dde403b7 (patch)
treef117d430e70e16aea175a4e7c74fa38e31f93094 /drivers/video
parent0aa163418edfb96ca3b39133979d8e4352aaac3c (diff)
fbdev: intelfb: add support for the Intel Integrated Graphics Controller 965G/965GM
Add support for the 965G and 965GM graphic chipsets to the intelfb driver. I have a notebook with an Intel Mobile GM965/GL960 Integrated Graphics Controller and with the attached patch the framebuffer comes up. I have tested it a bit with DirectFB to make sure it is working stable. I also have an Intel Mobile GM945 and I compared the results, the programming interface of the 9xx series from Intel is mostly the same, so I think the patch should add all the functionality which the 945GM has. Signed-off-by: Maik Broemme <mbroemme@plusserver.de> Cc: Dave Airlie <airlied@linux.ie> Cc: Antonino Daplas <adaplas@pol.net> Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/Kconfig4
-rw-r--r--drivers/video/intelfb/intelfb.h12
-rw-r--r--drivers/video/intelfb/intelfb_i2c.c2
-rw-r--r--drivers/video/intelfb/intelfbdrv.c12
-rw-r--r--drivers/video/intelfb/intelfbhw.c16
5 files changed, 38 insertions, 8 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 73d3afad7c50..55b629a2326e 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -1119,7 +1119,7 @@ config FB_CARILLO_RANCH
1119 This driver supports the LE80578 (Carillo Ranch) board 1119 This driver supports the LE80578 (Carillo Ranch) board
1120 1120
1121config FB_INTEL 1121config FB_INTEL
1122 tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G support (EXPERIMENTAL)" 1122 tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G/945GM/965G/965GM support (EXPERIMENTAL)"
1123 depends on FB && EXPERIMENTAL && PCI && X86 1123 depends on FB && EXPERIMENTAL && PCI && X86
1124 select AGP 1124 select AGP
1125 select AGP_INTEL 1125 select AGP_INTEL
@@ -1129,7 +1129,7 @@ config FB_INTEL
1129 select FB_CFB_IMAGEBLIT 1129 select FB_CFB_IMAGEBLIT
1130 help 1130 help
1131 This driver supports the on-board graphics built in to the Intel 1131 This driver supports the on-board graphics built in to the Intel
1132 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM chipsets. 1132 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets.
1133 Say Y if you have and plan to use such a board. 1133 Say Y if you have and plan to use such a board.
1134 1134
1135 If you say Y here and want DDC/I2C support you must first say Y to 1135 If you say Y here and want DDC/I2C support you must first say Y to
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h
index 836796177942..3325fbd68ab3 100644
--- a/drivers/video/intelfb/intelfb.h
+++ b/drivers/video/intelfb/intelfb.h
@@ -12,9 +12,9 @@
12#endif 12#endif
13 13
14/*** Version/name ***/ 14/*** Version/name ***/
15#define INTELFB_VERSION "0.9.4" 15#define INTELFB_VERSION "0.9.5"
16#define INTELFB_MODULE_NAME "intelfb" 16#define INTELFB_MODULE_NAME "intelfb"
17#define SUPPORTED_CHIPSETS "830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM" 17#define SUPPORTED_CHIPSETS "830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM"
18 18
19 19
20/*** Debug/feature defines ***/ 20/*** Debug/feature defines ***/
@@ -58,6 +58,8 @@
58#define PCI_DEVICE_ID_INTEL_915GM 0x2592 58#define PCI_DEVICE_ID_INTEL_915GM 0x2592
59#define PCI_DEVICE_ID_INTEL_945G 0x2772 59#define PCI_DEVICE_ID_INTEL_945G 0x2772
60#define PCI_DEVICE_ID_INTEL_945GM 0x27A2 60#define PCI_DEVICE_ID_INTEL_945GM 0x27A2
61#define PCI_DEVICE_ID_INTEL_965G 0x29A2
62#define PCI_DEVICE_ID_INTEL_965GM 0x2A02
61 63
62/* Size of MMIO region */ 64/* Size of MMIO region */
63#define INTEL_REG_SIZE 0x80000 65#define INTEL_REG_SIZE 0x80000
@@ -158,6 +160,8 @@ enum intel_chips {
158 INTEL_915GM, 160 INTEL_915GM,
159 INTEL_945G, 161 INTEL_945G,
160 INTEL_945GM, 162 INTEL_945GM,
163 INTEL_965G,
164 INTEL_965GM,
161}; 165};
162 166
163struct intelfb_hwstate { 167struct intelfb_hwstate {
@@ -358,7 +362,9 @@ struct intelfb_info {
358#define IS_I9XX(dinfo) (((dinfo)->chipset == INTEL_915G) || \ 362#define IS_I9XX(dinfo) (((dinfo)->chipset == INTEL_915G) || \
359 ((dinfo)->chipset == INTEL_915GM) || \ 363 ((dinfo)->chipset == INTEL_915GM) || \
360 ((dinfo)->chipset == INTEL_945G) || \ 364 ((dinfo)->chipset == INTEL_945G) || \
361 ((dinfo)->chipset==INTEL_945GM)) 365 ((dinfo)->chipset == INTEL_945GM) || \
366 ((dinfo)->chipset == INTEL_965G) || \
367 ((dinfo)->chipset == INTEL_965GM))
362 368
363#ifndef FBIO_WAITFORVSYNC 369#ifndef FBIO_WAITFORVSYNC
364#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) 370#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
diff --git a/drivers/video/intelfb/intelfb_i2c.c b/drivers/video/intelfb/intelfb_i2c.c
index 94c08bb5acf1..ca95f09d8b43 100644
--- a/drivers/video/intelfb/intelfb_i2c.c
+++ b/drivers/video/intelfb/intelfb_i2c.c
@@ -169,6 +169,8 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
169 /* has some LVDS + tv-out */ 169 /* has some LVDS + tv-out */
170 case INTEL_945G: 170 case INTEL_945G:
171 case INTEL_945GM: 171 case INTEL_945GM:
172 case INTEL_965G:
173 case INTEL_965GM:
172 /* SDVO ports have a single control bus - 2 devices */ 174 /* SDVO ports have a single control bus - 2 devices */
173 dinfo->output[i].type = INTELFB_OUTPUT_SDVO; 175 dinfo->output[i].type = INTELFB_OUTPUT_SDVO;
174 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus, 176 intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus,
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 481d58f7535d..e44303f9bc52 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -2,7 +2,7 @@
2 * intelfb 2 * intelfb
3 * 3 *
4 * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G/915GM/ 4 * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G/915GM/
5 * 945G/945GM integrated graphics chips. 5 * 945G/945GM/965G/965GM integrated graphics chips.
6 * 6 *
7 * Copyright © 2002, 2003 David Dawes <dawes@xfree86.org> 7 * Copyright © 2002, 2003 David Dawes <dawes@xfree86.org>
8 * 2004 Sylvain Meyer 8 * 2004 Sylvain Meyer
@@ -99,6 +99,9 @@
99 * Add vram option to reserve more memory than stolen by BIOS 99 * Add vram option to reserve more memory than stolen by BIOS
100 * Fix intelfbhw_pan_display typo 100 * Fix intelfbhw_pan_display typo
101 * Add __initdata annotations 101 * Add __initdata annotations
102 *
103 * 04/2008 - Version 0.9.5
104 * Add support for 965G/965GM. (Maik Broemme <mbroemme@plusserver.de>)
102 */ 105 */
103 106
104#include <linux/module.h> 107#include <linux/module.h>
@@ -180,6 +183,8 @@ static struct pci_device_id intelfb_pci_table[] __devinitdata = {
180 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_915GM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_915GM }, 183 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_915GM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_915GM },
181 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_945G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_945G }, 184 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_945G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_945G },
182 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_945GM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_945GM }, 185 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_945GM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_945GM },
186 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_965G },
187 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_965GM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_965GM },
183 { 0, } 188 { 0, }
184}; 189};
185 190
@@ -549,7 +554,10 @@ static int __devinit intelfb_pci_register(struct pci_dev *pdev,
549 if ((ent->device == PCI_DEVICE_ID_INTEL_915G) || 554 if ((ent->device == PCI_DEVICE_ID_INTEL_915G) ||
550 (ent->device == PCI_DEVICE_ID_INTEL_915GM) || 555 (ent->device == PCI_DEVICE_ID_INTEL_915GM) ||
551 (ent->device == PCI_DEVICE_ID_INTEL_945G) || 556 (ent->device == PCI_DEVICE_ID_INTEL_945G) ||
552 (ent->device == PCI_DEVICE_ID_INTEL_945GM)) { 557 (ent->device == PCI_DEVICE_ID_INTEL_945GM) ||
558 (ent->device == PCI_DEVICE_ID_INTEL_965G) ||
559 (ent->device == PCI_DEVICE_ID_INTEL_965GM)) {
560
553 aperture_bar = 2; 561 aperture_bar = 2;
554 mmio_bar = 0; 562 mmio_bar = 0;
555 } 563 }
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c
index fa1fff553565..8e6d6a4db0ad 100644
--- a/drivers/video/intelfb/intelfbhw.c
+++ b/drivers/video/intelfb/intelfbhw.c
@@ -143,6 +143,18 @@ int intelfbhw_get_chipset(struct pci_dev *pdev, struct intelfb_info *dinfo)
143 dinfo->mobile = 1; 143 dinfo->mobile = 1;
144 dinfo->pll_index = PLLS_I9xx; 144 dinfo->pll_index = PLLS_I9xx;
145 return 0; 145 return 0;
146 case PCI_DEVICE_ID_INTEL_965G:
147 dinfo->name = "Intel(R) 965G";
148 dinfo->chipset = INTEL_965G;
149 dinfo->mobile = 0;
150 dinfo->pll_index = PLLS_I9xx;
151 return 0;
152 case PCI_DEVICE_ID_INTEL_965GM:
153 dinfo->name = "Intel(R) 965GM";
154 dinfo->chipset = INTEL_965GM;
155 dinfo->mobile = 1;
156 dinfo->pll_index = PLLS_I9xx;
157 return 0;
146 default: 158 default:
147 return 1; 159 return 1;
148 } 160 }
@@ -174,7 +186,9 @@ int intelfbhw_get_memory(struct pci_dev *pdev, int *aperture_size,
174 case PCI_DEVICE_ID_INTEL_915GM: 186 case PCI_DEVICE_ID_INTEL_915GM:
175 case PCI_DEVICE_ID_INTEL_945G: 187 case PCI_DEVICE_ID_INTEL_945G:
176 case PCI_DEVICE_ID_INTEL_945GM: 188 case PCI_DEVICE_ID_INTEL_945GM:
177 /* 915 and 945 chipsets support a 256MB aperture. 189 case PCI_DEVICE_ID_INTEL_965G:
190 case PCI_DEVICE_ID_INTEL_965GM:
191 /* 915, 945 and 965 chipsets support a 256MB aperture.
178 Aperture size is determined by inspected the 192 Aperture size is determined by inspected the
179 base address of the aperture. */ 193 base address of the aperture. */
180 if (pci_resource_start(pdev, 2) & 0x08000000) 194 if (pci_resource_start(pdev, 2) & 0x08000000)