diff options
author | Rob Clark <rob@ti.com> | 2012-05-01 11:04:51 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-11 17:37:46 +0100 |
commit | b06d66be3b0b198ee30bd9f779874ae7115570a0 (patch) | |
tree | a50e0dcb547b45f2ca3c6ff0a298bfe4b73b298f /include | |
parent | 62363a486019b57be1b286f5235bc0d637aa1dda (diff) | |
download | linux-stable-b06d66be3b0b198ee30bd9f779874ae7115570a0.tar.gz linux-stable-b06d66be3b0b198ee30bd9f779874ae7115570a0.tar.bz2 linux-stable-b06d66be3b0b198ee30bd9f779874ae7115570a0.zip |
drm: pass dev to drm_vm_{open,close}_locked()
Previously these functions would assume that vma->vm_file was the
drm_file. Although if in some cases if the drm driver needs to use
something else for the backing file (such as the tmpfs filp) then this
assumption is no longer true. But vma->vm_private_data is still the
GEM object.
With this change, now the drm_device comes from the GEM object rather
than the drm_file so the driver is more free to play with vma->vm_file.
The scenario where this comes up is for mmap'ing of cached dmabuf's
for non-coherent systems, where the driver needs to use fault handling
and PTE shootdown to simulate coherency. We can't use the vma->vm_file
of the dmabuf, which is using anon_inode's address_space. The most
straightforward thing to do is to use the GEM object's obj->filp for
vma->vm_file in all cases, for which we need this patch.
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drmP.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 10a5f371e658..efd124903761 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1309,8 +1309,8 @@ extern int drm_release(struct inode *inode, struct file *filp); /* Mapping support (drm_vm.h) */ extern int drm_mmap(struct file *filp, struct vm_area_struct *vma); extern int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma); -extern void drm_vm_open_locked(struct vm_area_struct *vma); -extern void drm_vm_close_locked(struct vm_area_struct *vma); +extern void drm_vm_open_locked(struct drm_device *dev, struct vm_area_struct *vma); +extern void drm_vm_close_locked(struct drm_device *dev, struct vm_area_struct *vma); extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); /* Memory management support (drm_memory.h) */ |