diff options
Diffstat (limited to 'drivers/char/agp/intel-agp.c')
-rw-r--r-- | drivers/char/agp/intel-agp.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 8c7d727432bb..51266d6b4d78 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -286,7 +286,7 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type) | |||
286 | if (new == NULL) | 286 | if (new == NULL) |
287 | return NULL; | 287 | return NULL; |
288 | 288 | ||
289 | new->memory[0] = virt_to_phys(addr); | 289 | new->memory[0] = virt_to_gart(addr); |
290 | if (pg_count == 4) { | 290 | if (pg_count == 4) { |
291 | /* kludge to get 4 physical pages for ARGB cursor */ | 291 | /* kludge to get 4 physical pages for ARGB cursor */ |
292 | new->memory[1] = new->memory[0] + PAGE_SIZE; | 292 | new->memory[1] = new->memory[0] + PAGE_SIZE; |
@@ -329,10 +329,10 @@ static void intel_i810_free_by_type(struct agp_memory *curr) | |||
329 | agp_free_key(curr->key); | 329 | agp_free_key(curr->key); |
330 | if(curr->type == AGP_PHYS_MEMORY) { | 330 | if(curr->type == AGP_PHYS_MEMORY) { |
331 | if (curr->page_count == 4) | 331 | if (curr->page_count == 4) |
332 | i8xx_destroy_pages(phys_to_virt(curr->memory[0])); | 332 | i8xx_destroy_pages(gart_to_virt(curr->memory[0])); |
333 | else | 333 | else |
334 | agp_bridge->driver->agp_destroy_page( | 334 | agp_bridge->driver->agp_destroy_page( |
335 | phys_to_virt(curr->memory[0])); | 335 | gart_to_virt(curr->memory[0])); |
336 | vfree(curr->memory); | 336 | vfree(curr->memory); |
337 | } | 337 | } |
338 | kfree(curr); | 338 | kfree(curr); |
@@ -418,7 +418,8 @@ static void intel_i830_init_gtt_entries(void) | |||
418 | case I915_GMCH_GMS_STOLEN_48M: | 418 | case I915_GMCH_GMS_STOLEN_48M: |
419 | /* Check it's really I915G */ | 419 | /* Check it's really I915G */ |
420 | if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || | 420 | if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || |
421 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) | 421 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || |
422 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB) | ||
422 | gtt_entries = MB(48) - KB(size); | 423 | gtt_entries = MB(48) - KB(size); |
423 | else | 424 | else |
424 | gtt_entries = 0; | 425 | gtt_entries = 0; |
@@ -426,7 +427,8 @@ static void intel_i830_init_gtt_entries(void) | |||
426 | case I915_GMCH_GMS_STOLEN_64M: | 427 | case I915_GMCH_GMS_STOLEN_64M: |
427 | /* Check it's really I915G */ | 428 | /* Check it's really I915G */ |
428 | if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || | 429 | if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || |
429 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) | 430 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || |
431 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB) | ||
430 | gtt_entries = MB(64) - KB(size); | 432 | gtt_entries = MB(64) - KB(size); |
431 | else | 433 | else |
432 | gtt_entries = 0; | 434 | gtt_entries = 0; |
@@ -1662,6 +1664,14 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, | |||
1662 | } | 1664 | } |
1663 | name = "915GM"; | 1665 | name = "915GM"; |
1664 | break; | 1666 | break; |
1667 | case PCI_DEVICE_ID_INTEL_82945G_HB: | ||
1668 | if (find_i830(PCI_DEVICE_ID_INTEL_82945G_IG)) { | ||
1669 | bridge->driver = &intel_915_driver; | ||
1670 | } else { | ||
1671 | bridge->driver = &intel_845_driver; | ||
1672 | } | ||
1673 | name = "945G"; | ||
1674 | break; | ||
1665 | case PCI_DEVICE_ID_INTEL_7505_0: | 1675 | case PCI_DEVICE_ID_INTEL_7505_0: |
1666 | bridge->driver = &intel_7505_driver; | 1676 | bridge->driver = &intel_7505_driver; |
1667 | name = "E7505"; | 1677 | name = "E7505"; |
@@ -1801,6 +1811,7 @@ static struct pci_device_id agp_intel_pci_table[] = { | |||
1801 | ID(PCI_DEVICE_ID_INTEL_7205_0), | 1811 | ID(PCI_DEVICE_ID_INTEL_7205_0), |
1802 | ID(PCI_DEVICE_ID_INTEL_82915G_HB), | 1812 | ID(PCI_DEVICE_ID_INTEL_82915G_HB), |
1803 | ID(PCI_DEVICE_ID_INTEL_82915GM_HB), | 1813 | ID(PCI_DEVICE_ID_INTEL_82915GM_HB), |
1814 | ID(PCI_DEVICE_ID_INTEL_82945G_HB), | ||
1804 | { } | 1815 | { } |
1805 | }; | 1816 | }; |
1806 | 1817 | ||