diff options
Diffstat (limited to 'drivers/gpu/drm/gma500/gem.c')
| -rw-r--r-- | drivers/gpu/drm/gma500/gem.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c index 6d1cb6b370b1..527c62917660 100644 --- a/drivers/gpu/drm/gma500/gem.c +++ b/drivers/gpu/drm/gma500/gem.c | |||
| @@ -197,15 +197,14 @@ int psb_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
| 197 | 197 | ||
| 198 | /* Page relative to the VMA start - we must calculate this ourselves | 198 | /* Page relative to the VMA start - we must calculate this ourselves |
| 199 | because vmf->pgoff is the fake GEM offset */ | 199 | because vmf->pgoff is the fake GEM offset */ |
| 200 | page_offset = ((unsigned long) vmf->virtual_address - vma->vm_start) | 200 | page_offset = (vmf->address - vma->vm_start) >> PAGE_SHIFT; |
| 201 | >> PAGE_SHIFT; | ||
| 202 | 201 | ||
| 203 | /* CPU view of the page, don't go via the GART for CPU writes */ | 202 | /* CPU view of the page, don't go via the GART for CPU writes */ |
| 204 | if (r->stolen) | 203 | if (r->stolen) |
| 205 | pfn = (dev_priv->stolen_base + r->offset) >> PAGE_SHIFT; | 204 | pfn = (dev_priv->stolen_base + r->offset) >> PAGE_SHIFT; |
| 206 | else | 205 | else |
| 207 | pfn = page_to_pfn(r->pages[page_offset]); | 206 | pfn = page_to_pfn(r->pages[page_offset]); |
| 208 | ret = vm_insert_pfn(vma, (unsigned long)vmf->virtual_address, pfn); | 207 | ret = vm_insert_pfn(vma, vmf->address, pfn); |
| 209 | 208 | ||
| 210 | fail: | 209 | fail: |
| 211 | mutex_unlock(&dev_priv->mmap_mutex); | 210 | mutex_unlock(&dev_priv->mmap_mutex); |
