From: Daniel Vetter <daniel@ffwll.ch>
To: Dave Airlie <airlied@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/5] drm/crtc: take references to connectors used in a modeset.
Date: Wed, 27 Apr 2016 09:34:34 +0200 [thread overview]
Message-ID: <20160427073434.GP2558@phenom.ffwll.local> (raw)
In-Reply-To: <1461722609-32474-3-git-send-email-airlied@gmail.com>
On Wed, Apr 27, 2016 at 12:03:27PM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> This just takes a reference on the connector when we set a mode
> in the non-atomic paths.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/drm_crtc_helper.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index 66ca313..29b7835 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -456,6 +456,9 @@ drm_crtc_helper_disable(struct drm_crtc *crtc)
> * between them is henceforth no longer available.
> */
> connector->dpms = DRM_MODE_DPMS_OFF;
> +
> + /* we keep a reference while the encoder is bound */
> + drm_connector_unreference(connector);
> }
> }
>
> @@ -635,9 +638,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
> mode_changed = true;
> /* If the encoder is reused for another connector, then
> * the appropriate crtc will be set later.
> + * take a reference only if we haven't had an encoder before.
> */
> if (connector->encoder)
> connector->encoder->crtc = NULL;
> + else
> + drm_connector_reference(connector);
> connector->encoder = new_encoder;
> }
> }
> --
> 2.5.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
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-04-27 7:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 2:03 [PATCH 1/5] drm/modes: add connector reference counting. (v2) Dave Airlie
2016-04-27 2:03 ` [PATCH 2/5] drm/fb_helper: add connector reference counting Dave Airlie
2016-04-27 7:33 ` [Intel-gfx] " Daniel Vetter
2016-04-27 2:03 ` [PATCH 3/5] drm/crtc: take references to connectors used in a modeset Dave Airlie
2016-04-27 7:07 ` Daniel Stone
2016-04-27 7:34 ` Daniel Vetter [this message]
2016-04-27 7:48 ` Daniel Vetter
2016-04-27 2:03 ` [PATCH 4/5] drm/atomic: use connector references Dave Airlie
2016-04-27 7:13 ` Daniel Stone
2016-04-27 7:47 ` [Intel-gfx] " Daniel Vetter
2016-04-27 7:22 ` Daniel Stone
2016-04-27 2:03 ` [PATCH 5/5] drm/i915/mst: use reference counted connectors. (v2) Dave Airlie
2016-04-27 7:52 ` Daniel Vetter
2016-04-27 7:28 ` [Intel-gfx] [PATCH 1/5] drm/modes: add connector reference counting. (v2) 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=20160427073434.GP2558@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@gmail.com \
--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