From: Thierry Reding <thierry.reding@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/atomic: add plane iterator macros
Date: Fri, 21 Nov 2014 21:42:25 +0100 [thread overview]
Message-ID: <20141121204223.GB10379@mithrandir> (raw)
In-Reply-To: <20141121203840.GC25711@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 2496 bytes --]
On Fri, Nov 21, 2014 at 09:38:40PM +0100, Daniel Vetter wrote:
> On Fri, Nov 21, 2014 at 03:28:32PM -0500, Rob Clark wrote:
> > Add helper macros to iterate the current, or incoming set of planes
> > attached to a crtc. These helpers are only available for drivers
> > converted to use atomic-helpers.
> >
> > Signed-off-by: Rob Clark <robdclark@gmail.com>
> > ---
> > Documentation/DocBook/drm.tmpl | 1 +
> > include/drm/drm_atomic_helper.h | 26 ++++++++++++++++++++++++++
> > 2 files changed, 27 insertions(+)
> >
> > diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
> > index 8c54f9a..3789f2d 100644
> > --- a/Documentation/DocBook/drm.tmpl
> > +++ b/Documentation/DocBook/drm.tmpl
> > @@ -2343,6 +2343,7 @@ void intel_crt_init(struct drm_device *dev)
> > <title>Atomic State Reset and Initialization</title>
> > !Pdrivers/gpu/drm/drm_atomic_helper.c atomic state reset and initialization
> > </sect3>
> > +!Iinclude/drm/drm_atomic_helper.h
> > !Edrivers/gpu/drm/drm_atomic_helper.c
> > </sect2>
> > <sect2>
> > diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
> > index 64b4e91..42d56e6 100644
> > --- a/include/drm/drm_atomic_helper.h
> > +++ b/include/drm/drm_atomic_helper.h
> > @@ -96,5 +96,31 @@ drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector);
> > void drm_atomic_helper_connector_destroy_state(struct drm_connector *connector,
> > struct drm_connector_state *state);
> >
> > +/**
> > + * drm_crtc_for_each_plane - iterate over planes currently attached to crtc
> > + * @plane: the loop cursor
> > + * @crtc: the crtc whose planes are iterated
> > + *
> > + * This iterates over the current state, useful (for example) when applying
> > + * atomic state after it has been checked and swapped. To iterate over the
> > + * planes which *will* be attached (for ->atomic_check()) see
> > + * drm_crtc_for_each_pending_plane()
> > + */
> > +#define drm_crtc_for_each_plane(plane, crtc) \
> > + list_for_each_entry((plane), &(crtc)->dev->mode_config.plane_list, head) \
> > + if ((crtc)->state->plane_mask & (1 << drm_plane_index(plane)))
>
> Implement this as drm_crtc_for_each_pending_plane(plane, (crtc)->state)?
> Which means _pending is a strange name ...
Yeah, I think the drm_crtc_for_each_pending_plane() could be
drm_crtc_state_for_each_plane(), then your suggestion makes perfect
sense.
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2014-11-21 20:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 20:28 [PATCH 1/2] drm/atomic: track bitmask of planes attached to crtc Rob Clark
2014-11-21 20:28 ` [PATCH 2/2] drm/atomic: add plane iterator macros Rob Clark
2014-11-21 20:38 ` Daniel Vetter
2014-11-21 20:42 ` Thierry Reding [this message]
2014-11-25 12:31 ` Daniel Vetter
2014-11-21 20:46 ` Thierry Reding
2014-11-25 14:15 ` [PATCH 1/2] drm/atomic: track bitmask of planes attached to crtc 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=20141121204223.GB10379@mithrandir \
--to=thierry.reding@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.