[05/12] drm/fb-helper: Drop locking from the vsync wait ioctl code

Submitted by Daniel Vetter on June 21, 2017, 6:28 p.m.


Message ID 20170621182815.14602-6-daniel.vetter@ffwll.ch
State New
Headers show
Series "fbdev helper locking rework and deferred setup" ( rev: 2 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Daniel Vetter June 21, 2017, 6:28 p.m.
Like with the drm-native vblank wait ioctl we can entirely rely on the
spinlocks in drm_vblank.c, no need at all to take expensive mutexes.
The only reason we had to take mode_config.mutex was to protect the
fbdev helper's data-structures, but that's now done by

Cc: John Stultz <john.stultz@linaro.org>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
 drivers/gpu/drm/drm_fb_helper.c | 2 --
 1 file changed, 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 14b3f885a01f..13330c22e6bf 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1342,7 +1342,6 @@  int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd,
 		goto unlock;
-	mutex_lock(&dev->mode_config.mutex);
 	switch (cmd) {
@@ -1382,7 +1381,6 @@  int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd,
-	mutex_unlock(&dev->mode_config.mutex);
 	return ret;