agp: switch AGP to use page array instead of unsigned long array
This switches AGP to use an array of pages for tracking the pages allocated to the GART. This should enable GEM on PAE to work a lot better as we can pass highmem pages to the PAT code and it will do the right thing with them. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -141,17 +141,17 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
|
||||
bridge->version = &agp_current_version;
|
||||
|
||||
if (bridge->driver->needs_scratch_page) {
|
||||
void *addr = bridge->driver->agp_alloc_page(bridge);
|
||||
struct page *page = bridge->driver->agp_alloc_page(bridge);
|
||||
|
||||
if (!addr) {
|
||||
if (!page) {
|
||||
dev_err(&bridge->dev->dev,
|
||||
"can't get memory for scratch page\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
bridge->scratch_page_real = virt_to_gart(addr);
|
||||
bridge->scratch_page_real = phys_to_gart(page_to_phys(page));
|
||||
bridge->scratch_page =
|
||||
bridge->driver->mask_memory(bridge, bridge->scratch_page_real, 0);
|
||||
bridge->driver->mask_memory(bridge, page, 0);
|
||||
}
|
||||
|
||||
size_value = bridge->driver->fetch_size();
|
||||
|
Reference in New Issue
Block a user