diff options
author | Dmitry Osipenko | 2022-10-17 20:22:11 +0300 |
---|---|---|
committer | Dmitry Osipenko | 2022-10-18 01:21:38 +0300 |
commit | 79e2cf2e7a193473dfb0da3b9b869682b43dc60f (patch) | |
tree | 4edf97bf0cf01f1c7b3ba1dde6b6134e9053b9c9 /include/drm | |
parent | 19d6634d8789573a9212ce78dbb4348ffd4f7f78 (diff) |
drm/gem: Take reservation lock for vmap/vunmap operations
The new common dma-buf locking convention will require buffer importers
to hold the reservation lock around mapping operations. Make DRM GEM core
to take the lock around the vmapping operations and update DRM drivers to
use the locked functions for the case where DRM core now holds the lock.
This patch prepares DRM core and drivers to the common dynamic dma-buf
locking convention.
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-4-dmitry.osipenko@collabora.com
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_gem.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index 58a18a17c67e..ed82039bfd5b 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -408,6 +408,9 @@ struct page **drm_gem_get_pages(struct drm_gem_object *obj); void drm_gem_put_pages(struct drm_gem_object *obj, struct page **pages, bool dirty, bool accessed); +int drm_gem_vmap_unlocked(struct drm_gem_object *obj, struct iosys_map *map); +void drm_gem_vunmap_unlocked(struct drm_gem_object *obj, struct iosys_map *map); + int drm_gem_objects_lookup(struct drm_file *filp, void __user *bo_handles, int count, struct drm_gem_object ***objs_out); struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle); |