]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Clean up fbdev modeset locking
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 26 Apr 2018 07:48:55 +0000 (09:48 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 26 Apr 2018 07:48:55 +0000 (09:48 +0200)
commit0ecae280b073e1a28b7f233a1018521f42e3cae6
tree9c34947c4a95a21d0fd2e18eceed2924ef1c5cab
parent79f7db6eb22c3ba1535c2810704dcd4b793652d7
drm/vmwgfx: Clean up fbdev modeset locking

At least since the atomic port, the vmwgfx fbdev code is taking
a number of unnecessary modeset locks. In particular the
kms_set_config() function will grab its own locks, leading to
locking retries. So avoid drm_modeset_lock_all() and instead
provide a local acquire context for kms_set_config(). Also have the
vmw_kms_fbdev_init data itself grab the lock that it needs.

This also fixed a long standing problem that vmw_fb_close() didn't
provide an acquire context for kms_set_config(), causing potential
warnings and hangs during driver unload. This problem was uncovered by the
recent commit "drm/vmwgfx: Improve on hibernation"

Testing done:
Repeated driver load and unload on Ubuntu 16.04.2

Fixes: 33414448007b ("drm/vmwgfx: Improve on hibernation")
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c