summaryrefslogtreecommitdiff
path: root/include/drm/drm_gem_vram_helper.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-09-06 14:20:56 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2019-09-09 12:52:24 +0200
commit2236439bc6679caa905d65def47dacd12466c2e9 (patch)
tree84bc753c4b72e203f9f457c32558d6dad550020b /include/drm/drm_gem_vram_helper.h
parentf3309105b87956bdadfcc35bf0cefc463f427c9b (diff)
drm/vram: Implement lazy unmapping for GEM VRAM buffers
Frequent mapping and unmapping a buffer object adds overhead for modifying the page table and creates debug output. Unmapping a buffer is only required when the memory manager evicts the buffer from its current location. v4: * WARN_ON if buffer is still mapped during BO cleanup Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reported-and-tested-by: Davidlohr Bueso <dbueso@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20190906122056.32018-5-tzimmermann@suse.de
Diffstat (limited to 'include/drm/drm_gem_vram_helper.h')
-rw-r--r--include/drm/drm_gem_vram_helper.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h
index 4f0e207ee097..b47c46516466 100644
--- a/include/drm/drm_gem_vram_helper.h
+++ b/include/drm/drm_gem_vram_helper.h
@@ -112,6 +112,10 @@ int drm_gem_vram_fill_create_dumb(struct drm_file *file,
void drm_gem_vram_bo_driver_evict_flags(struct ttm_buffer_object *bo,
struct ttm_placement *pl);
+void drm_gem_vram_bo_driver_move_notify(struct ttm_buffer_object *bo,
+ bool evict,
+ struct ttm_mem_reg *new_mem);
+
int drm_gem_vram_bo_driver_verify_access(struct ttm_buffer_object *bo,
struct file *filp);