summaryrefslogtreecommitdiff
path: root/linux-core/drm_vm.c
diff options
context:
space:
mode:
authorNian Wu <nian.wu@intel.com>2007-03-25 17:00:36 +0800
committerNian Wu <nian.wu@intel.com>2007-03-25 17:00:36 +0800
commitddc87d302526347f670e8b61e227c0eb05c15cde (patch)
treed7a208a783145fb2b737053f000bc56b9b2f908a /linux-core/drm_vm.c
parente7cd5a1e2df29c1a06b74439faf750c6c5bb8e4a (diff)
parent5ad43f46759ff1eb473c9101e7de0d46a4ed8177 (diff)
Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestline
Diffstat (limited to 'linux-core/drm_vm.c')
-rw-r--r--linux-core/drm_vm.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index 775ca878..54a0849f 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -596,13 +596,12 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
)
return drm_mmap_dma(filp, vma);
- if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff , &hash)) {
+ if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash)) {
DRM_ERROR("Could not find map\n");
return -EINVAL;
}
- map = drm_hash_entry(hash,drm_map_list_t, hash)->map;
-
+ map = drm_hash_entry(hash, drm_map_list_t, hash)->map;
if (!map || ((map->flags & _DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN)))
return -EPERM;
@@ -647,16 +646,11 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
vma->vm_page_prot = drm_io_prot(map->type, vma);
#ifdef __sparc__
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+#endif
if (io_remap_pfn_range(vma, vma->vm_start,
- (map->offset + offset) >>PAGE_SHIFT,
+ (map->offset + offset) >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
vma->vm_page_prot))
-#else
- if (remap_pfn_range(vma, vma->vm_start,
- (map->offset + offset) >> PAGE_SHIFT,
- vma->vm_end - vma->vm_start,
- vma->vm_page_prot))
-#endif
return -EAGAIN;
DRM_DEBUG(" Type = %d; start = 0x%lx, end = 0x%lx,"
" offset = 0x%lx\n",