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 08/10] drm: Drop mode_config.mutex from connector_register_all
Date: Tue, 21 Jun 2016 11:10:33 +0200	[thread overview]
Message-ID: <1466500235-21282-9-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1466500235-21282-1-git-send-email-daniel.vetter@ffwll.ch>

With the reworked connector_list locking we don't need this
any more. Also, we can remove the FIXME comment from the unregister
function, too, by using drm_for_each_connector.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_crtc.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index dc22c0bfbe99..d104717cab6b 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1107,20 +1107,15 @@ int drm_connector_register_all(struct drm_device *dev)
 	struct drm_connector_iter iter;
 	int ret;
 
-	mutex_lock(&dev->mode_config.mutex);
-
 	drm_for_each_connector(connector, dev, iter) {
 		ret = drm_connector_register(connector);
 		if (ret)
 			goto err;
 	}
 
-	mutex_unlock(&dev->mode_config.mutex);
-
 	return 0;
 
 err:
-	mutex_unlock(&dev->mode_config.mutex);
 	drm_connector_unregister_all(dev);
 	return ret;
 }
@@ -1139,9 +1134,9 @@ EXPORT_SYMBOL(drm_connector_register_all);
 void drm_connector_unregister_all(struct drm_device *dev)
 {
 	struct drm_connector *connector;
+	struct drm_connector_iter iter;
 
-	/* FIXME: taking the mode config mutex ends up in a clash with sysfs */
-	list_for_each_entry(connector, &dev->mode_config.connector_list, head)
+	drm_for_each_connector(connector, dev, iter)
 		drm_connector_unregister(connector);
 }
 EXPORT_SYMBOL(drm_connector_unregister_all);
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-06-21  9:10 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 ` Daniel Vetter [this message]
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     ` [PATCH] " Daniel Vetter
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=1466500235-21282-9-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