Intel-GFX Archive on 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>
Subject: [PATCH] drm: Drop mode_config.mutex from get_resources ioctl
Date: Tue, 21 Jun 2016 14:41:08 +0200	[thread overview]
Message-ID: <1466512868-9182-1-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20160621094417.GD1821@nuc-i3427.alporthouse.com>

The only thing this protected is the connector_list, which is
now protected differently.

v2: Also remove comment (Chris).

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_crtc.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 13c3bacc6b51..f8931b82865a 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1904,9 +1904,6 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
 	card_res->count_fbs = fb_count;
 	mutex_unlock(&file_priv->fbs_lock);
 
-	/* mode_config.mutex protects the connector list against e.g. DP MST
-	 * connector hot-adding. CRTC/Plane lists are invariant. */
-	mutex_lock(&dev->mode_config.mutex);
 	card_res->max_height = dev->mode_config.max_height;
 	card_res->min_height = dev->mode_config.min_height;
 	card_res->max_width = dev->mode_config.max_width;
@@ -1961,7 +1958,6 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
 	card_res->count_connectors = connector_count;
 
 out:
-	mutex_unlock(&dev->mode_config.mutex);
 	return ret;
 }
 
-- 
2.8.1

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

  reply	other threads:[~2016-06-21 12:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21  9:10 [PATCH 00/10] RFC: hot-unplug safe connector list locking Daniel Vetter
2016-06-21  9:10 ` [PATCH 01/10] drm/amd-kfd: Clean up inline handling Daniel Vetter
2016-06-21 19:11   ` Oded Gabbay
2016-06-21 19:22     ` Daniel Vetter
2016-06-22  7:35     ` Daniel Vetter
2016-06-21  9:10 ` [PATCH 02/10] drm: Don't compute obj counts expensively in get_resources Daniel Vetter
2016-06-21  9:48   ` Chris Wilson
2016-06-21 12:21     ` Daniel Vetter
2016-06-21 12:29   ` [PATCH] " Daniel Vetter
2016-06-21 12:40     ` Chris Wilson
2016-06-21  9:10 ` [PATCH 03/10] drm: Add explicit iter struct to drm_for_each_connector Daniel Vetter
2016-06-21  9:10 ` [PATCH 04/10] drm/i915: Use use the drm_for_each_connector in i915_debugfs.c Daniel Vetter
2016-06-21  9:10 ` [PATCH 05/10] drm/i915: Roll out drm_for_each_connector in intel_hotplug.c Daniel Vetter
2016-06-21  9:10 ` [PATCH 06/10] drm: Drop cargo-culted modeset_lock_all from encoder/plane init/cleanup Daniel Vetter
2016-06-21  9:10 ` [PATCH 07/10] drm: Revamp connector_list protection Daniel Vetter
2016-06-22  9:09   ` Daniel Vetter
2016-06-21  9:10 ` [PATCH 08/10] drm: Drop mode_config.mutex from connector_register_all Daniel Vetter
2016-06-21  9:10 ` [PATCH 09/10] drm: Drop mode_config.mutex from get_resources ioctl Daniel Vetter
2016-06-21  9:44   ` Chris Wilson
2016-06-21 12:41     ` Daniel Vetter [this message]
2016-06-21  9:10 ` [PATCH 10/10] drm: Drop mode_config.mutex from _reset() Daniel Vetter
2016-06-21 10:28 ` ✗ Ro.CI.BAT: warning for RFC: hot-unplug safe connector list locking Patchwork

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=1466512868-9182-1-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox