diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-09-09 12:17:34 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-21 06:36:11 -0400 |
commit | a87aa5cc0074fea871c8c6d2660d9b6cd7699d3d (patch) | |
tree | f28de481abe2577bd6459ecad54b4a44892ad6a1 /drivers/char | |
parent | d0b6dc4b930e3be9c02cc9638f02e14d271d5f0d (diff) |
agp: kill agp_(map|unmap)_page
Only used to remap the scratch page. Now that intel-gtt does this
itself, kill the support code.
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/agp/agp.h | 2 | ||||
-rw-r--r-- | drivers/char/agp/backend.c | 22 |
2 files changed, 1 insertions, 23 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h index 120490949997..04ad0bbfaf41 100644 --- a/drivers/char/agp/agp.h +++ b/drivers/char/agp/agp.h | |||
@@ -122,8 +122,6 @@ struct agp_bridge_driver { | |||
122 | int (*agp_type_to_mask_type) (struct agp_bridge_data *, int); | 122 | int (*agp_type_to_mask_type) (struct agp_bridge_data *, int); |
123 | void (*chipset_flush)(struct agp_bridge_data *); | 123 | void (*chipset_flush)(struct agp_bridge_data *); |
124 | 124 | ||
125 | int (*agp_map_page)(struct page *page, dma_addr_t *ret); | ||
126 | void (*agp_unmap_page)(struct page *page, dma_addr_t dma); | ||
127 | int (*agp_map_memory)(struct agp_memory *mem); | 125 | int (*agp_map_memory)(struct agp_memory *mem); |
128 | void (*agp_unmap_memory)(struct agp_memory *mem); | 126 | void (*agp_unmap_memory)(struct agp_memory *mem); |
129 | }; | 127 | }; |
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c index ee4f855611b6..f27d0d0816d3 100644 --- a/drivers/char/agp/backend.c +++ b/drivers/char/agp/backend.c | |||
@@ -151,17 +151,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) | |||
151 | } | 151 | } |
152 | 152 | ||
153 | bridge->scratch_page_page = page; | 153 | bridge->scratch_page_page = page; |
154 | if (bridge->driver->agp_map_page) { | 154 | bridge->scratch_page_dma = page_to_phys(page); |
155 | if (bridge->driver->agp_map_page(page, | ||
156 | &bridge->scratch_page_dma)) { | ||
157 | dev_err(&bridge->dev->dev, | ||
158 | "unable to dma-map scratch page\n"); | ||
159 | rc = -ENOMEM; | ||
160 | goto err_out_nounmap; | ||
161 | } | ||
162 | } else { | ||
163 | bridge->scratch_page_dma = page_to_phys(page); | ||
164 | } | ||
165 | 155 | ||
166 | bridge->scratch_page = bridge->driver->mask_memory(bridge, | 156 | bridge->scratch_page = bridge->driver->mask_memory(bridge, |
167 | bridge->scratch_page_dma, 0); | 157 | bridge->scratch_page_dma, 0); |
@@ -204,12 +194,6 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) | |||
204 | return 0; | 194 | return 0; |
205 | 195 | ||
206 | err_out: | 196 | err_out: |
207 | if (bridge->driver->needs_scratch_page && | ||
208 | bridge->driver->agp_unmap_page) { | ||
209 | bridge->driver->agp_unmap_page(bridge->scratch_page_page, | ||
210 | bridge->scratch_page_dma); | ||
211 | } | ||
212 | err_out_nounmap: | ||
213 | if (bridge->driver->needs_scratch_page) { | 197 | if (bridge->driver->needs_scratch_page) { |
214 | void *va = page_address(bridge->scratch_page_page); | 198 | void *va = page_address(bridge->scratch_page_page); |
215 | 199 | ||
@@ -240,10 +224,6 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge) | |||
240 | bridge->driver->needs_scratch_page) { | 224 | bridge->driver->needs_scratch_page) { |
241 | void *va = page_address(bridge->scratch_page_page); | 225 | void *va = page_address(bridge->scratch_page_page); |
242 | 226 | ||
243 | if (bridge->driver->agp_unmap_page) | ||
244 | bridge->driver->agp_unmap_page(bridge->scratch_page_page, | ||
245 | bridge->scratch_page_dma); | ||
246 | |||
247 | bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_UNMAP); | 227 | bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_UNMAP); |
248 | bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_FREE); | 228 | bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_FREE); |
249 | } | 229 | } |