From: Daniel Vetter <daniel@ffwll.ch>
To: Daniel Stone <daniel@fooishbar.org>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 4/5] drm/atomic: use connector references
Date: Wed, 27 Apr 2016 09:47:31 +0200 [thread overview]
Message-ID: <20160427074731.GR2558@phenom.ffwll.local> (raw)
In-Reply-To: <CAPj87rNF=v3cR9XMqpU6jTdKvAxzUwHEj8uApkfMaxmrUs2vWQ@mail.gmail.com>
On Wed, Apr 27, 2016 at 08:13:04AM +0100, Daniel Stone wrote:
> Hi,
>
> On 27 April 2016 at 03:03, Dave Airlie <airlied@gmail.com> wrote:
> > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> > index 9d5e3c8..d899dac 100644
> > --- a/drivers/gpu/drm/drm_atomic.c
> > +++ b/drivers/gpu/drm/drm_atomic.c
> > @@ -1179,6 +1179,15 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
> >
> > conn_state->crtc = crtc;
> >
> > + /* If we had no crtc then got one, add a reference,
> > + * if we had a crtc and are going to none, drop a reference,
> > + * otherwise just keep the reference we have.
> > + */
> > + if (!had_crtc && crtc)
> > + drm_connector_reference(conn_state->connector);
> > + else if (!crtc && had_crtc)
> > + drm_connector_unreference(conn_state->connector);
>
> Similarly to the non-atomic comments, can you drop the had_crtc test
> here, and always ref if crtc, and unref if !crtc?
Yeah, that's more in line with how we refcount other stuff in atomic. With
that bikeshed:
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> Cheers,
> Daniel
> _______________________________________________
> 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:47 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 ` [Intel-gfx] " Daniel Vetter
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 ` Daniel Vetter [this message]
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=20160427074731.GR2558@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel@fooishbar.org \
--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