diff options
author | Dave Airlie <airlied@redhat.com> | 2009-06-12 00:11:41 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-06-18 20:21:42 -0400 |
commit | 07613ba2f464f59949266f4337b75b91eb610795 (patch) | |
tree | 8e43a82571686492aba2269c2e7a49c323783af1 /drivers/char/agp/backend.c | |
parent | 2908826d045a89805714e0a3055a99dc40565d41 (diff) |
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>
Diffstat (limited to 'drivers/char/agp/backend.c')
-rw-r--r-- | drivers/char/agp/backend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c index 8c617ad7497f..cfa5a649dfe7 100644 --- a/drivers/char/agp/backend.c +++ b/drivers/char/agp/backend.c | |||
@@ -141,17 +141,17 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) | |||
141 | bridge->version = &agp_current_version; | 141 | bridge->version = &agp_current_version; |
142 | 142 | ||
143 | if (bridge->driver->needs_scratch_page) { | 143 | if (bridge->driver->needs_scratch_page) { |
144 | void *addr = bridge->driver->agp_alloc_page(bridge); | 144 | struct page *page = bridge->driver->agp_alloc_page(bridge); |
145 | 145 | ||
146 | if (!addr) { | 146 | if (!page) { |
147 | dev_err(&bridge->dev->dev, | 147 | dev_err(&bridge->dev->dev, |
148 | "can't get memory for scratch page\n"); | 148 | "can't get memory for scratch page\n"); |
149 | return -ENOMEM; | 149 | return -ENOMEM; |
150 | } | 150 | } |
151 | 151 | ||
152 | bridge->scratch_page_real = virt_to_gart(addr); | 152 | bridge->scratch_page_real = phys_to_gart(page_to_phys(page)); |
153 | bridge->scratch_page = | 153 | bridge->scratch_page = |
154 | bridge->driver->mask_memory(bridge, bridge->scratch_page_real, 0); | 154 | bridge->driver->mask_memory(bridge, page, 0); |
155 | } | 155 | } |
156 | 156 | ||
157 | size_value = bridge->driver->fetch_size(); | 157 | size_value = bridge->driver->fetch_size(); |