]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vram: Acquire lock only once per call to vmap()/vunmap()
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 6 Sep 2019 12:20:54 +0000 (14:20 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 9 Sep 2019 10:52:17 +0000 (12:52 +0200)
commitb274612c0fe2b49e6ae6ca48b2614023d1f452b5
tree9ee4294fefb8878f1f66e5cfbcc40b1b639a6165
parent4ef0ff6843bef11cf14a37f0e1161ae5c0098a06
drm/vram: Acquire lock only once per call to vmap()/vunmap()

The implementation of vmap() is a combined pin() and kmap(). As both
functions share the same lock, we can make vmap() slightly faster by
acquiring the lock only once for both operations. Same for the inverse,
vunmap().

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-3-tzimmermann@suse.de
drivers/gpu/drm/drm_gem_vram_helper.c