From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/7] drm: Automatically register/unregister all connectors
Date: Fri, 17 Jun 2016 14:43:12 +0200 [thread overview]
Message-ID: <20160617124312.GO23520@phenom.ffwll.local> (raw)
In-Reply-To: <1466151923-1572-2-git-send-email-chris@chris-wilson.co.uk>
On Fri, Jun 17, 2016 at 09:25:17AM +0100, Chris Wilson wrote:
> As the drm_connector is now safe for multiple calls to
> register/unregister, automatically perform a registration on all known
> connectors drm drv_register (and unregister from drm_drv_unregister).
> Drivers can still call drm_connector_register() and
> drm_connector_unregister() individually, or defer as required.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
Applied to drm-misc. I'll let driver maintainers have a little bit more
time to ack or test the patches before I vacuum them up.
Thanks, Daniel
> ---
> drivers/gpu/drm/drm_crtc.c | 6 +++---
> drivers/gpu/drm/drm_drv.c | 10 +++++-----
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 316dea9bea08..e7c862bd2f19 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1047,9 +1047,9 @@ EXPORT_SYMBOL(drm_connector_unregister);
> * @dev: drm device
> *
> * This function registers all connectors in sysfs and other places so that
> - * userspace can start to access them. Drivers can call it after calling
> - * drm_dev_register() to complete the device registration, if they don't call
> - * drm_connector_register() on each connector individually.
> + * userspace can start to access them. drm_connector_register_all() is called
> + * automatically from drm_dev_register() to complete the device registration,
> + * if they don't call drm_connector_register() on each connector individually.
> *
> * When a device is unplugged and should be removed from userspace access,
> * call drm_connector_unregister_all(), which is the inverse of this
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 40fb4352432c..2067ff089380 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -650,11 +650,7 @@ EXPORT_SYMBOL(drm_dev_unref);
> *
> * Register the DRM device @dev with the system, advertise device to user-space
> * and start normal device operation. @dev must be allocated via drm_dev_alloc()
> - * previously. Right after drm_dev_register() the driver should call
> - * drm_connector_register_all() to register all connectors in sysfs. This is
> - * a separate call for backward compatibility with drivers still using
> - * the deprecated ->load() callback, where connectors are registered from within
> - * the ->load() callback.
> + * previously.
> *
> * Never call this twice on any device!
> *
> @@ -691,6 +687,8 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
> goto err_minors;
> }
>
> + drm_connector_register_all(dev);
> +
> ret = 0;
> goto out_unlock;
>
> @@ -721,6 +719,8 @@ void drm_dev_unregister(struct drm_device *dev)
>
> drm_lastclose(dev);
>
> + drm_connector_unregister_all(dev);
> +
> if (dev->driver->unload)
> dev->driver->unload(dev);
>
> --
> 2.8.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-06-17 12:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 8:25 Make connector registration automatic Chris Wilson
2016-06-17 8:25 ` [PATCH 1/7] drm: Automatically register/unregister all connectors Chris Wilson
2016-06-17 12:43 ` Daniel Vetter [this message]
2016-06-17 8:25 ` [PATCH 2/7] drm/arc: Remove redundant calls to drm_connector_register_all() Chris Wilson
2016-06-17 8:25 ` [PATCH 3/7] drm/atmel-hlcdc: " Chris Wilson
2016-06-18 0:41 ` Emil Velikov
2016-06-17 8:25 ` [PATCH 4/7] drm/hisilicon: " Chris Wilson
2016-06-20 3:36 ` Xinliang Liu
2016-06-17 8:25 ` [PATCH 5/7] drm/mediatek: " Chris Wilson
[not found] ` <1466151923-1572-1-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2016-06-17 8:25 ` [PATCH 6/7] drm/msm: " Chris Wilson
2016-06-17 9:14 ` Archit Taneja
2016-06-17 8:25 ` [PATCH 7/7] drm/rcar-du: " Chris Wilson
2016-06-21 8:56 ` Daniel Vetter
2016-06-21 9:15 ` Laurent Pinchart
2016-06-17 8:47 ` ✗ Ro.CI.BAT: warning for series starting with [1/7] drm: Automatically register/unregister all connectors Patchwork
2016-06-17 9:12 ` Chris Wilson
2016-06-17 10:44 ` Chris Wilson
2016-06-17 13:36 ` 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=20160617124312.GO23520@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=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