aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2008-01-22 23:54:37 -0500
committerDave Airlie <airlied@redhat.com>2008-02-04 23:33:33 -0500
commit4e8b6e25943a22036a6b704ebef634c7dec4c10e (patch)
tree0106e5e94d7e240ac4dba8d840f79f90735d3208 /drivers/char/agp
parent91d361c279b66ce4d617d544641d5f70b27c401a (diff)
intel-agp: add new chipset ID
This one adds new pci ids for Intel intergrated graphics chipset, with gtt table access change on it and new gtt table size definition. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/agp')
-rw-r--r--drivers/char/agp/agp.h3
-rw-r--r--drivers/char/agp/intel-agp.c31
2 files changed, 29 insertions, 5 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index 9ec9374ccc42..c69f79598e47 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -236,6 +236,9 @@ struct agp_bridge_data {
236#define I965_PGETBL_SIZE_512KB (0 << 1) 236#define I965_PGETBL_SIZE_512KB (0 << 1)
237#define I965_PGETBL_SIZE_256KB (1 << 1) 237#define I965_PGETBL_SIZE_256KB (1 << 1)
238#define I965_PGETBL_SIZE_128KB (2 << 1) 238#define I965_PGETBL_SIZE_128KB (2 << 1)
239#define I965_PGETBL_SIZE_1MB (3 << 1)
240#define I965_PGETBL_SIZE_2MB (4 << 1)
241#define I965_PGETBL_SIZE_1_5MB (5 << 1)
239#define G33_PGETBL_SIZE_MASK (3 << 8) 242#define G33_PGETBL_SIZE_MASK (3 << 8)
240#define G33_PGETBL_SIZE_1M (1 << 8) 243#define G33_PGETBL_SIZE_1M (1 << 8)
241#define G33_PGETBL_SIZE_2M (2 << 8) 244#define G33_PGETBL_SIZE_2M (2 << 8)
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 8e61a0530485..6fa97ae6a126 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -32,13 +32,16 @@
32#define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2 32#define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2
33#define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0 33#define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0
34#define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2 34#define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2
35#define PCI_DEVICE_ID_INTEL_IGD_HB 0x2A40
36#define PCI_DEVICE_ID_INTEL_IGD_IG 0x2A42
35 37
36#define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \ 38#define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \
37 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_1_HB || \ 39 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_1_HB || \
38 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ 40 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \
39 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \ 41 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \
40 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \ 42 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \
41 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB) 43 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \
44 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_HB)
42 45
43#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \ 46#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \
44 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \ 47 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
@@ -461,6 +464,15 @@ static void intel_i830_init_gtt_entries(void)
461 case I965_PGETBL_SIZE_512KB: 464 case I965_PGETBL_SIZE_512KB:
462 size = 512; 465 size = 512;
463 break; 466 break;
467 case I965_PGETBL_SIZE_1MB:
468 size = 1024;
469 break;
470 case I965_PGETBL_SIZE_2MB:
471 size = 2048;
472 break;
473 case I965_PGETBL_SIZE_1_5MB:
474 size = 1024 + 512;
475 break;
464 default: 476 default:
465 printk(KERN_INFO PFX "Unknown page table size, " 477 printk(KERN_INFO PFX "Unknown page table size, "
466 "assuming 512KB\n"); 478 "assuming 512KB\n");
@@ -1124,6 +1136,7 @@ static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge)
1124 struct aper_size_info_fixed *size; 1136 struct aper_size_info_fixed *size;
1125 int num_entries; 1137 int num_entries;
1126 u32 temp; 1138 u32 temp;
1139 int gtt_offset, gtt_size;
1127 1140
1128 size = agp_bridge->current_size; 1141 size = agp_bridge->current_size;
1129 page_order = size->page_order; 1142 page_order = size->page_order;
@@ -1133,13 +1146,18 @@ static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge)
1133 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp); 1146 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp);
1134 1147
1135 temp &= 0xfff00000; 1148 temp &= 0xfff00000;
1136 intel_private.gtt = ioremap((temp + (512 * 1024)) , 512 * 1024);
1137 1149
1138 if (!intel_private.gtt) 1150 if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_HB)
1139 return -ENOMEM; 1151 gtt_offset = gtt_size = MB(2);
1152 else
1153 gtt_offset = gtt_size = KB(512);
1154
1155 intel_private.gtt = ioremap((temp + gtt_offset) , gtt_size);
1140 1156
1157 if (!intel_private.gtt)
1158 return -ENOMEM;
1141 1159
1142 intel_private.registers = ioremap(temp,128 * 4096); 1160 intel_private.registers = ioremap(temp, 128 * 4096);
1143 if (!intel_private.registers) { 1161 if (!intel_private.registers) {
1144 iounmap(intel_private.gtt); 1162 iounmap(intel_private.gtt);
1145 return -ENOMEM; 1163 return -ENOMEM;
@@ -2036,6 +2054,8 @@ static const struct intel_driver_description {
2036 NULL, &intel_g33_driver }, 2054 NULL, &intel_g33_driver },
2037 { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33", 2055 { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33",
2038 NULL, &intel_g33_driver }, 2056 NULL, &intel_g33_driver },
2057 { PCI_DEVICE_ID_INTEL_IGD_HB, PCI_DEVICE_ID_INTEL_IGD_IG, 0,
2058 "Intel Integrated Graphics Device", NULL, &intel_i965_driver },
2039 { 0, 0, 0, NULL, NULL, NULL } 2059 { 0, 0, 0, NULL, NULL, NULL }
2040}; 2060};
2041 2061
@@ -2226,6 +2246,7 @@ static struct pci_device_id agp_intel_pci_table[] = {
2226 ID(PCI_DEVICE_ID_INTEL_G33_HB), 2246 ID(PCI_DEVICE_ID_INTEL_G33_HB),
2227 ID(PCI_DEVICE_ID_INTEL_Q35_HB), 2247 ID(PCI_DEVICE_ID_INTEL_Q35_HB),
2228 ID(PCI_DEVICE_ID_INTEL_Q33_HB), 2248 ID(PCI_DEVICE_ID_INTEL_Q33_HB),
2249 ID(PCI_DEVICE_ID_INTEL_IGD_HB),
2229 { } 2250 { }
2230}; 2251};
2231 2252