diff options
Diffstat (limited to 'drivers/char/agp/intel-gtt.c')
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 12c31026eb56..7fcee5c2e986 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -75,6 +75,7 @@ static struct _intel_private { | |||
75 | struct resource ifp_resource; | 75 | struct resource ifp_resource; |
76 | int resource_valid; | 76 | int resource_valid; |
77 | struct page *scratch_page; | 77 | struct page *scratch_page; |
78 | phys_addr_t scratch_page_dma; | ||
78 | int refcount; | 79 | int refcount; |
79 | } intel_private; | 80 | } intel_private; |
80 | 81 | ||
@@ -297,9 +298,9 @@ static int intel_gtt_setup_scratch_page(void) | |||
297 | if (pci_dma_mapping_error(intel_private.pcidev, dma_addr)) | 298 | if (pci_dma_mapping_error(intel_private.pcidev, dma_addr)) |
298 | return -EINVAL; | 299 | return -EINVAL; |
299 | 300 | ||
300 | intel_private.base.scratch_page_dma = dma_addr; | 301 | intel_private.scratch_page_dma = dma_addr; |
301 | } else | 302 | } else |
302 | intel_private.base.scratch_page_dma = page_to_phys(page); | 303 | intel_private.scratch_page_dma = page_to_phys(page); |
303 | 304 | ||
304 | intel_private.scratch_page = page; | 305 | intel_private.scratch_page = page; |
305 | 306 | ||
@@ -546,7 +547,7 @@ static unsigned int intel_gtt_mappable_entries(void) | |||
546 | static void intel_gtt_teardown_scratch_page(void) | 547 | static void intel_gtt_teardown_scratch_page(void) |
547 | { | 548 | { |
548 | set_pages_wb(intel_private.scratch_page, 1); | 549 | set_pages_wb(intel_private.scratch_page, 1); |
549 | pci_unmap_page(intel_private.pcidev, intel_private.base.scratch_page_dma, | 550 | pci_unmap_page(intel_private.pcidev, intel_private.scratch_page_dma, |
550 | PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); | 551 | PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); |
551 | put_page(intel_private.scratch_page); | 552 | put_page(intel_private.scratch_page); |
552 | __free_page(intel_private.scratch_page); | 553 | __free_page(intel_private.scratch_page); |
@@ -891,7 +892,7 @@ void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries) | |||
891 | unsigned int i; | 892 | unsigned int i; |
892 | 893 | ||
893 | for (i = first_entry; i < (first_entry + num_entries); i++) { | 894 | for (i = first_entry; i < (first_entry + num_entries); i++) { |
894 | intel_private.driver->write_entry(intel_private.base.scratch_page_dma, | 895 | intel_private.driver->write_entry(intel_private.scratch_page_dma, |
895 | i, 0); | 896 | i, 0); |
896 | } | 897 | } |
897 | readl(intel_private.gtt+i-1); | 898 | readl(intel_private.gtt+i-1); |