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,
Dave Airlie <airlied@redhat.com>
Subject: Re: [PATCH 04/44] drm: Automatically unregister the connector during cleanup
Date: Fri, 17 Jun 2016 09:44:40 +0200 [thread overview]
Message-ID: <20160617074440.GK23520@phenom.ffwll.local> (raw)
In-Reply-To: <1465993109-19523-5-git-send-email-chris@chris-wilson.co.uk>
On Wed, Jun 15, 2016 at 01:17:49PM +0100, Chris Wilson wrote:
> As we now can call drm_connector_unregister() multiple times, provide a
> failsafe unregister for a connector when cleaning it up.
>
> v2: Add a WARN to catch any connectors that are still visible to
> userspace when we come to destoy them.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: dri-devel@lists.freedesktop.org
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ok, merged up to this one to drm-misc. Please resend the other core/driver
patches, preferrably as a stand-alone series.
Thanks, Daniel
> ---
> drivers/gpu/drm/drm_crtc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index ea5ec641eacc..316dea9bea08 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -938,6 +938,12 @@ void drm_connector_cleanup(struct drm_connector *connector)
> struct drm_device *dev = connector->dev;
> struct drm_display_mode *mode, *t;
>
> + /* The connector should have been removed from userspace long before
> + * it is finally destroyed.
> + */
> + if (WARN_ON(connector->registered))
> + drm_connector_unregister(connector);
> +
> if (connector->tile_group) {
> drm_mode_put_tile_group(dev, connector->tile_group);
> connector->tile_group = NULL;
> --
> 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 7:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1465993109-19523-1-git-send-email-chris@chris-wilson.co.uk>
2016-06-15 12:17 ` [PATCH 01/44] drm: Export drm_dev_init() for subclassing Chris Wilson
2016-06-15 12:17 ` [PATCH 02/44] drm: Add a callback from connector registering Chris Wilson
2016-06-17 7:41 ` Daniel Vetter
2016-06-15 12:17 ` [PATCH 03/44] drm: Make drm_connector_register() safe against multiple calls Chris Wilson
2016-06-15 12:17 ` [PATCH 04/44] drm: Automatically unregister the connector during cleanup Chris Wilson
2016-06-17 7:44 ` Daniel Vetter [this message]
2016-06-15 12:17 ` [PATCH 05/44] drm: Automatically register/unregister all connectors Chris Wilson
2016-06-15 12:17 ` [PATCH 06/44] drm/arc: Remove redundant calls to drm_connector_register_all() Chris Wilson
2016-06-15 12:17 ` [PATCH 07/44] drm/atmel-hlcdc: " Chris Wilson
2016-06-15 12:17 ` [PATCH 08/44] drm/hisilicon: " Chris Wilson
2016-06-15 12:17 ` [PATCH 09/44] drm/mediatek: " Chris Wilson
2016-06-15 12:17 ` [PATCH 10/44] drm/msm: " Chris Wilson
2016-06-15 12:17 ` [PATCH 11/44] drm/rcar-du: " Chris Wilson
2016-06-15 12:17 ` [PATCH 12/44] drm: Pass the drm_dp_aux->hw_mutex to i2c for its locking Chris Wilson
2016-06-15 12:17 ` [PATCH 13/44] drm: Minimally initialise drm_dp_aux Chris Wilson
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=20160617074440.GK23520@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@redhat.com \
--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