summaryrefslogtreecommitdiff
path: root/include/drm/drm_gem_vram_helper.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-09-11 14:03:50 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2019-09-17 13:09:38 +0200
commitc8908bde0dbd35145f2cb6894e742aec84674af7 (patch)
tree8cc2a38181da4a734a4cc2e015dc68776d5306a8 /include/drm/drm_gem_vram_helper.h
parent4d74b25ee395cb2faf615519e765f47ce5964a96 (diff)
drm/vram: Provide vmap and vunmap operations for GEM VRAM objects
The implementation of vmap and vunmap for GEM VRAM helpers is already in PRIME helpers. The patch moves the operations to separate functions and exports them for general use. v3: * remove v2's obsolete note on ref-counting v2: * fix documentation * add cross references to function documentation * document (the lack of) ref-counting for GEM VRAM BO mappings Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190911120352.20084-2-tzimmermann@suse.de
Diffstat (limited to 'include/drm/drm_gem_vram_helper.h')
-rw-r--r--include/drm/drm_gem_vram_helper.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h
index 9aaef4f8c327..418eb1122861 100644
--- a/include/drm/drm_gem_vram_helper.h
+++ b/include/drm/drm_gem_vram_helper.h
@@ -43,7 +43,8 @@ struct vm_area_struct;
* operations. So a buffer object that has been pinned N times with
* drm_gem_vram_pin() must be unpinned N times with
* drm_gem_vram_unpin(). The same applies to pairs of
- * drm_gem_vram_kmap() and drm_gem_vram_kunmap().
+ * drm_gem_vram_kmap() and drm_gem_vram_kunmap(), as well as pairs of
+ * drm_gem_vram_vmap() and drm_gem_vram_vunmap().
*/
struct drm_gem_vram_object {
struct ttm_buffer_object bo;
@@ -101,6 +102,8 @@ int drm_gem_vram_unpin(struct drm_gem_vram_object *gbo);
void *drm_gem_vram_kmap(struct drm_gem_vram_object *gbo, bool map,
bool *is_iomem);
void drm_gem_vram_kunmap(struct drm_gem_vram_object *gbo);
+void *drm_gem_vram_vmap(struct drm_gem_vram_object *gbo);
+void drm_gem_vram_vunmap(struct drm_gem_vram_object *gbo, void *vaddr);
int drm_gem_vram_fill_create_dumb(struct drm_file *file,
struct drm_device *dev,