diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-10-16 13:51:54 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-10-17 13:59:16 +0200 |
commit | 0be895893607fb3447478d6e33dfb60644195a09 (patch) | |
tree | 9986d1b70a2f9049c286d6ce98ffb50264857574 /include/drm | |
parent | drm: add mmap() to drm_gem_object_funcs (diff) | |
download | linux-0be895893607fb3447478d6e33dfb60644195a09.tar.xz linux-0be895893607fb3447478d6e33dfb60644195a09.zip |
drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap
Switch gem shmem helper to the new mmap() workflow,
from &gem_driver.fops.mmap to &drm_gem_object_funcs.mmap.
v2: Fix vm_flags and vm_page_prot handling.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-3-kraxel@redhat.com
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_gem_shmem_helper.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h index 01f514521687..d89f2116c8ab 100644 --- a/include/drm/drm_gem_shmem_helper.h +++ b/include/drm/drm_gem_shmem_helper.h @@ -111,7 +111,7 @@ struct drm_gem_shmem_object { .poll = drm_poll,\ .read = drm_read,\ .llseek = noop_llseek,\ - .mmap = drm_gem_shmem_mmap, \ + .mmap = drm_gem_mmap, \ } struct drm_gem_shmem_object *drm_gem_shmem_create(struct drm_device *dev, size_t size); @@ -143,9 +143,7 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv, int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args); -int drm_gem_shmem_mmap(struct file *filp, struct vm_area_struct *vma); - -extern const struct vm_operations_struct drm_gem_shmem_vm_ops; +int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); void drm_gem_shmem_print_info(struct drm_printer *p, unsigned int indent, const struct drm_gem_object *obj); |