]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vram: Implement lazy unmapping for GEM VRAM buffers
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 6 Sep 2019 12:20:56 +0000 (14:20 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 9 Sep 2019 10:52:24 +0000 (12:52 +0200)
commit1adfa4bb0e12f174309407ef399b43c48c1dff4b
tree84bc753c4b72e203f9f457c32558d6dad550020b
parent75a2e714fc124484bd2ee99ed02ee9de7ef21e74
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
drivers/gpu/drm/drm_gem_vram_helper.c
include/drm/drm_gem_vram_helper.h