Skip to content

Commit

Permalink
drm/fb-helper: Drop locking from the vsync wait ioctl code
Browse files Browse the repository at this point in the history
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
fb_helper->lock.

Cc: John Stultz <john.stultz@linaro.org>
Cc: Thierry Reding <treding@nvidia.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170704151833.17304-6-daniel.vetter@ffwll.ch
  • Loading branch information
Daniel Vetter committed Jul 6, 2017
1 parent bdac4a0 commit 235d3e4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,6 @@ int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd,
goto unlock;
}

mutex_lock(&dev->mode_config.mutex);
switch (cmd) {
case FBIO_WAITFORVSYNC:
/*
Expand Down Expand Up @@ -1368,7 +1367,6 @@ int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd,
}

unlock:
mutex_unlock(&dev->mode_config.mutex);
mutex_unlock(&fb_helper->lock);
return ret;
}
Expand Down

0 comments on commit 235d3e4

Please sign in to comment.