diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-07-29 08:39:26 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-08-03 09:04:54 +0100 |
commit | c2980d8c2961113f24863f70d8ad016f55224c81 (patch) | |
tree | 642962c363fe11d2ead4caffeaaf712629259dfa /drivers/char/agp/backend.c | |
parent | 56ec4c1e72865c6d99f643b6574e6e074c3e8823 (diff) |
agp: Switch agp_{un,}map_page() to take struct page * argument
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/char/agp/backend.c')
-rw-r--r-- | drivers/char/agp/backend.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c index 3c3a487f7b9..343f102090a 100644 --- a/drivers/char/agp/backend.c +++ b/drivers/char/agp/backend.c @@ -149,9 +149,9 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) return -ENOMEM; } - bridge->scratch_page_real = phys_to_gart(page_to_phys(page)); + bridge->scratch_page_page = page; if (bridge->driver->agp_map_page) { - if (bridge->driver->agp_map_page(phys_to_virt(page_to_phys(page)), + if (bridge->driver->agp_map_page(page, &bridge->scratch_page_dma)) { dev_err(&bridge->dev->dev, "unable to dma-map scratch page\n"); @@ -205,13 +205,12 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) err_out: if (bridge->driver->needs_scratch_page && bridge->driver->agp_unmap_page) { - void *va = gart_to_virt(bridge->scratch_page_real); - - bridge->driver->agp_unmap_page(va, bridge->scratch_page_dma); + bridge->driver->agp_unmap_page(bridge->scratch_page_page, + bridge->scratch_page_dma); } err_out_nounmap: if (bridge->driver->needs_scratch_page) { - void *va = gart_to_virt(bridge->scratch_page_real); + void *va = page_address(bridge->scratch_page_page); bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_UNMAP); bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_FREE); @@ -238,11 +237,11 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge) if (bridge->driver->agp_destroy_page && bridge->driver->needs_scratch_page) { - void *va = gart_to_virt(bridge->scratch_page_real); + void *va = page_address(bridge->scratch_page_page); if (bridge->driver->agp_unmap_page) - bridge->driver->agp_unmap_page(va, - bridge->scratch_page_dma); + bridge->driver->agp_unmap_page(bridge->scratch_page_page, + bridge->scratch_page_dma); bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_UNMAP); bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_FREE); |