aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp')
-rw-r--r--drivers/char/agp/intel-agp.c1
-rw-r--r--drivers/char/agp/intel-gtt.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index b427711be4be..962e75dc4781 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -850,6 +850,7 @@ static struct pci_device_id agp_intel_pci_table[] = {
850 .subvendor = PCI_ANY_ID, \ 850 .subvendor = PCI_ANY_ID, \
851 .subdevice = PCI_ANY_ID, \ 851 .subdevice = PCI_ANY_ID, \
852 } 852 }
853 ID(PCI_DEVICE_ID_INTEL_82441), /* for HAS2 support */
853 ID(PCI_DEVICE_ID_INTEL_82443LX_0), 854 ID(PCI_DEVICE_ID_INTEL_82443LX_0),
854 ID(PCI_DEVICE_ID_INTEL_82443BX_0), 855 ID(PCI_DEVICE_ID_INTEL_82443BX_0),
855 ID(PCI_DEVICE_ID_INTEL_82443GX_0), 856 ID(PCI_DEVICE_ID_INTEL_82443GX_0),
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index c92424ca1a55..5cf47ac2d401 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -76,7 +76,6 @@ static struct _intel_private {
76 struct resource ifp_resource; 76 struct resource ifp_resource;
77 int resource_valid; 77 int resource_valid;
78 struct page *scratch_page; 78 struct page *scratch_page;
79 dma_addr_t scratch_page_dma;
80} intel_private; 79} intel_private;
81 80
82#define INTEL_GTT_GEN intel_private.driver->gen 81#define INTEL_GTT_GEN intel_private.driver->gen
@@ -306,9 +305,9 @@ static int intel_gtt_setup_scratch_page(void)
306 if (pci_dma_mapping_error(intel_private.pcidev, dma_addr)) 305 if (pci_dma_mapping_error(intel_private.pcidev, dma_addr))
307 return -EINVAL; 306 return -EINVAL;
308 307
309 intel_private.scratch_page_dma = dma_addr; 308 intel_private.base.scratch_page_dma = dma_addr;
310 } else 309 } else
311 intel_private.scratch_page_dma = page_to_phys(page); 310 intel_private.base.scratch_page_dma = page_to_phys(page);
312 311
313 intel_private.scratch_page = page; 312 intel_private.scratch_page = page;
314 313
@@ -631,7 +630,7 @@ static unsigned int intel_gtt_mappable_entries(void)
631static void intel_gtt_teardown_scratch_page(void) 630static void intel_gtt_teardown_scratch_page(void)
632{ 631{
633 set_pages_wb(intel_private.scratch_page, 1); 632 set_pages_wb(intel_private.scratch_page, 1);
634 pci_unmap_page(intel_private.pcidev, intel_private.scratch_page_dma, 633 pci_unmap_page(intel_private.pcidev, intel_private.base.scratch_page_dma,
635 PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); 634 PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
636 put_page(intel_private.scratch_page); 635 put_page(intel_private.scratch_page);
637 __free_page(intel_private.scratch_page); 636 __free_page(intel_private.scratch_page);
@@ -681,6 +680,7 @@ static int intel_gtt_init(void)
681 iounmap(intel_private.registers); 680 iounmap(intel_private.registers);
682 return -ENOMEM; 681 return -ENOMEM;
683 } 682 }
683 intel_private.base.gtt = intel_private.gtt;
684 684
685 global_cache_flush(); /* FIXME: ? */ 685 global_cache_flush(); /* FIXME: ? */
686 686
@@ -975,7 +975,7 @@ void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries)
975 unsigned int i; 975 unsigned int i;
976 976
977 for (i = first_entry; i < (first_entry + num_entries); i++) { 977 for (i = first_entry; i < (first_entry + num_entries); i++) {
978 intel_private.driver->write_entry(intel_private.scratch_page_dma, 978 intel_private.driver->write_entry(intel_private.base.scratch_page_dma,
979 i, 0); 979 i, 0);
980 } 980 }
981 readl(intel_private.gtt+i-1); 981 readl(intel_private.gtt+i-1);