All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Thierry Reding <treding@nvidia.com>,
	John Stultz <john.stultz@linaro.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH 05/13] drm/fb-helper: Drop locking from the vsync wait ioctl code
Date: Tue,  4 Jul 2017 17:18:25 +0200	[thread overview]
Message-ID: <20170704151833.17304-6-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20170704151833.17304-1-daniel.vetter@ffwll.ch>

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>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 2 --
 1 file changed, 2 deletions(-)

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) {
 	case FBIO_WAITFORVSYNC:
 		/*
@@ -1382,7 +1381,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;
 }
-- 
2.13.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-07-04 15:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04 15:18 [PATCH 00/13] fbdev locking + deferred setup take 3 Daniel Vetter
2017-07-04 15:18 ` [PATCH 01/13] drm/fb-helper: Push down modeset lock into FB helpers Daniel Vetter
2017-07-04 15:18 ` [PATCH 02/13] drm/i915: Drop FBDEV #ifdev in mst code Daniel Vetter
2017-07-04 15:18 ` [PATCH 03/13] drm/fb-helper: Add top-level lock Daniel Vetter
2017-07-04 15:18 ` [PATCH 04/13] drm/fb-helper: Push locking in fb_is_bound Daniel Vetter
2017-07-04 15:18 ` Daniel Vetter [this message]
2017-07-04 15:18 ` [PATCH 06/13] drm/fb-helper: Push locking into pan_display_atomic|legacy Daniel Vetter
2017-07-04 15:18 ` [PATCH 07/13] drm/fb-helper: Push locking into restore_fbdev_mode_atomic|legacy Daniel Vetter
2017-07-04 15:18 ` [PATCH 08/13] drm/fb-helper: Stop using mode_config.mutex for internals Daniel Vetter
2017-07-04 15:40   ` Ville Syrjälä
2017-07-04 16:19     ` Daniel Vetter
2017-07-05  4:56   ` [PATCH] " Daniel Vetter
2017-07-04 15:18 ` [PATCH 09/13] drm/fb-helper: Split dpms handling into legacy and atomic paths Daniel Vetter
2017-07-04 15:18 ` [PATCH 10/13] drm/fb-helper: Support deferred setup Daniel Vetter
2017-07-04 15:29   ` Liviu Dudau
2017-07-05 11:20   ` Maarten Lankhorst
2017-07-04 15:18 ` [PATCH 11/13] drm/i915: Protect against deferred fbdev setup Daniel Vetter
2017-07-05 10:08   ` Maarten Lankhorst
2017-07-05 20:17     ` Daniel Vetter
2017-07-04 15:18 ` [PATCH 12/13] drm/exynos: Remove custom FB helper deferred setup Daniel Vetter
2017-07-06  3:16   ` Inki Dae
2017-07-04 15:18 ` [PATCH 13/13] drm/hisilicon: " Daniel Vetter
2017-07-04 16:39 ` ✓ Fi.CI.BAT: success for fbdev locking + deferred setup take 3 Patchwork
2017-07-05  5:14 ` ✓ Fi.CI.BAT: success for fbdev locking + deferred setup take 3 (rev2) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2017-06-27 14:59 [PATCH 00/13] fbdev locking rework and deferred setup, take 2 Daniel Vetter
2017-06-27 14:59 ` [PATCH 05/13] drm/fb-helper: Drop locking from the vsync wait ioctl code Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170704151833.17304-6-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=john.stultz@linaro.org \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.