]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/drm/drm_gem.h
Merge tag 'linux-watchdog-5.5-rc1' of git://www.linux-watchdog.org/linux-watchdog
[linux.git] / include / drm / drm_gem.h
index 6aaba14f5972d2dd5c7a61fd91377de9d482f2fb..97a48165642c1e5191902a32e84ba5e93d90f8f5 100644 (file)
@@ -150,6 +150,21 @@ struct drm_gem_object_funcs {
         */
        void (*vunmap)(struct drm_gem_object *obj, void *vaddr);
 
+       /**
+        * @mmap:
+        *
+        * Handle mmap() of the gem object, setup vma accordingly.
+        *
+        * This callback is optional.
+        *
+        * The callback is used by by both drm_gem_mmap_obj() and
+        * drm_gem_prime_mmap().  When @mmap is present @vm_ops is not
+        * used, the @mmap callback must set vma->vm_ops instead. The @mmap
+        * callback is always called with a 0 offset. The caller will remove
+        * the fake offset as necessary.
+        */
+       int (*mmap)(struct drm_gem_object *obj, struct vm_area_struct *vma);
+
        /**
         * @vm_ops:
         *