diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-08-28 09:28:10 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-08-28 09:28:10 +0200 |
commit | 4ddabd15620e6e4638a6a37a3a2b5bced626fcf9 (patch) | |
tree | e0b6916c0d34c4cb7adbfa87c8438124a9acbba8 /linux-core/drm_vm.c | |
parent | 886d3b3061cdf53f5a353cbaac843f63104d2658 (diff) | |
parent | 9b984b34e99f694e10251e15bc2ec1bc844dcca4 (diff) |
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into drm-ttm-0-2-branch
Conflicts:
linux-core/drmP.h
Diffstat (limited to 'linux-core/drm_vm.c')
-rw-r--r-- | linux-core/drm_vm.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index b5003c97..7163341d 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -89,7 +89,7 @@ static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma, drm_device_t *dev = priv->head->dev; drm_map_t *map = NULL; drm_map_list_t *r_list; - drm_hash_item_t *hash; + drm_hash_item_t *hash; /* * Find the right map @@ -100,10 +100,10 @@ static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma, if (!dev->agp || !dev->agp->cant_use_aperture) goto vm_nopage_error; - if (drm_ht_find_item(&dev->map_hash, VM_OFFSET(vma), &hash)) - goto vm_nopage_error; + if (drm_ht_find_item(&dev->map_hash, VM_OFFSET(vma), &hash)) + goto vm_nopage_error; - r_list = drm_hash_entry(hash, drm_map_list_t, hash); + r_list = drm_hash_entry(hash, drm_map_list_t, hash); map = r_list->map; if (map && map->type == _DRM_AGP) { @@ -805,7 +805,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma) drm_device_t *dev = priv->head->dev; drm_map_t *map = NULL; unsigned long offset = 0; - drm_hash_item_t *hash; + drm_hash_item_t *hash; DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n", vma->vm_start, vma->vm_end, VM_OFFSET(vma)); @@ -825,11 +825,11 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma) ) return drm_mmap_dma(filp, vma); - if (drm_ht_find_item(&dev->map_hash, VM_OFFSET(vma), &hash)) { - DRM_ERROR("Could not find map\n"); + if (drm_ht_find_item(&dev->map_hash, VM_OFFSET(vma), &hash)) { + DRM_ERROR("Could not find map\n"); return -EINVAL; - } - + } + map = drm_hash_entry(hash,drm_map_list_t, hash)->map; if (!map || ((map->flags & _DRM_RESTRICTED) && !capable(CAP_SYS_ADMIN))) |