aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/intel-gtt.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index c92424ca1a55..0a305acb0374 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);
@@ -975,7 +974,7 @@ void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries)
975 unsigned int i; 974 unsigned int i;
976 975
977 for (i = first_entry; i < (first_entry + num_entries); i++) { 976 for (i = first_entry; i < (first_entry + num_entries); i++) {
978 intel_private.driver->write_entry(intel_private.scratch_page_dma, 977 intel_private.driver->write_entry(intel_private.base.scratch_page_dma,
979 i, 0); 978 i, 0);
980 } 979 }
981 readl(intel_private.gtt+i-1); 980 readl(intel_private.gtt+i-1);