From: Daniel Vetter <daniel@ffwll.ch>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Vincent Abriou <vincent.abriou@st.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Fabien Dessenne <fabien.dessenne@st.com>
Subject: Re: [PATCH 2/5] drm: sti: add atomic get/set properties for planes
Date: Thu, 7 Jan 2016 15:47:20 +0100 [thread overview]
Message-ID: <20160107144720.GT8076@phenom.ffwll.local> (raw)
In-Reply-To: <CA+M3ks4hX0fviezi3B7dUXdc46ACu091VqK5h42LtbVAWuxLrQ@mail.gmail.com>
On Thu, Jan 07, 2016 at 03:05:02PM +0100, Benjamin Gaignard wrote:
> zpos property isn't new in sti driver only the atomic set/get functions are
> new.
> Without those functions atomictest failed to discover any of the other
> atomic planes properties.
>
> I agree with you, zpos should be generic and I could work with Marek for
> that
> but if this patch isn't merge sti atomic modesetting support will be
> limited to primary planes...
These two hooks should be optional. The only downside of not adding them
is that zpos property can't be read, everything else should still work ...
And yeah everyone added zpos without a hole lot of thought about
cross-driver consistency, which is not great. Now everyone gets to clean
things up again I'd say.
-Daniel
>
> Benjamin
>
>
> 2016-01-07 14:50 GMT+01:00 Daniel Vetter <daniel@ffwll.ch>:
>
> > On Thu, Jan 07, 2016 at 02:30:38PM +0100, Benjamin Gaignard wrote:
> > > Without those function zpos property isn't displayed in atomic mode.
> > >
> > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> >
> > Oh, another iteration of a driver-private zpos property. This _really_
> > should be generic, with some consistent cross-driver semantics. Marek from
> > samsung has started with a patch series for that.
> >
> > Can you please work together with him, and rebase the sti zpos support on
> > top of his work? And hold of this patch for now meanwhile?
> >
> > Also adding Marek.
> >
> > Thanks, Daniel
> >
> > > ---
> > > drivers/gpu/drm/sti/sti_plane.c | 40
> > ++++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 40 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/sti/sti_plane.c
> > b/drivers/gpu/drm/sti/sti_plane.c
> > > index 2e5c751..e739c5a 100644
> > > --- a/drivers/gpu/drm/sti/sti_plane.c
> > > +++ b/drivers/gpu/drm/sti/sti_plane.c
> > > @@ -69,6 +69,44 @@ static int sti_plane_set_property(struct drm_plane
> > *drm_plane,
> > > return -EINVAL;
> > > }
> > >
> > > +static int sti_plane_atomic_set_property(struct drm_plane *drm_plane,
> > > + struct drm_plane_state *state,
> > > + struct drm_property *property,
> > > + uint64_t val)
> > > +{
> > > + struct drm_device *dev = drm_plane->dev;
> > > + struct sti_private *private = dev->dev_private;
> > > + struct sti_plane *plane = to_sti_plane(drm_plane);
> > > +
> > > + DRM_DEBUG_DRIVER("\n");
> > > +
> > > + if (property == private->plane_zorder_property) {
> > > + plane->zorder = val;
> > > + return 0;
> > > + }
> > > +
> > > + return -EINVAL;
> > > +}
> > > +
> > > +static int sti_plane_atomic_get_property(struct drm_plane *drm_plane,
> > > + const struct drm_plane_state
> > *state,
> > > + struct drm_property *property,
> > > + uint64_t *val)
> > > +{
> > > + struct drm_device *dev = drm_plane->dev;
> > > + struct sti_private *private = dev->dev_private;
> > > + struct sti_plane *plane = to_sti_plane(drm_plane);
> > > +
> > > + DRM_DEBUG_DRIVER("\n");
> > > +
> > > + if (property == private->plane_zorder_property) {
> > > + *val = plane->zorder;
> > > + return 0;
> > > + }
> > > +
> > > + return -EINVAL;
> > > +}
> > > +
> > > static void sti_plane_attach_zorder_property(struct drm_plane
> > *drm_plane)
> > > {
> > > struct drm_device *dev = drm_plane->dev;
> > > @@ -116,4 +154,6 @@ struct drm_plane_funcs sti_plane_helpers_funcs = {
> > > .reset = drm_atomic_helper_plane_reset,
> > > .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
> > > .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
> > > + .atomic_set_property = sti_plane_atomic_set_property,
> > > + .atomic_get_property = sti_plane_atomic_get_property,
> > > };
> > > --
> > > 1.9.1
> > >
> > > _______________________________________________
> > > dri-devel mailing list
> > > dri-devel@lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> >
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
> >
>
>
>
> --
>
> Benjamin Gaignard
>
> Graphic Working Group
>
> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
>
> Follow *Linaro: *Facebook <http://www.facebook.com/pages/Linaro> | Twitter
> <http://twitter.com/#!/linaroorg> | Blog
> <http://www.linaro.org/linaro-blog/>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-01-07 14:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 13:30 [PATCH 0/5] sti fix to enable atomic modesetting Benjamin Gaignard
2016-01-07 13:30 ` [PATCH 1/5] drm: sti: fix potential crash in gdp Benjamin Gaignard
2016-01-07 13:30 ` [PATCH 2/5] drm: sti: add atomic get/set properties for planes Benjamin Gaignard
2016-01-07 13:50 ` Daniel Vetter
2016-01-07 14:05 ` Benjamin Gaignard
2016-01-07 14:47 ` Daniel Vetter [this message]
2016-01-13 8:53 ` Benjamin Gaignard
2016-01-13 8:58 ` Daniel Vetter
2016-01-07 13:30 ` [PATCH 3/5] drm: sti: set CRTC modesetting parameters Benjamin Gaignard
2016-01-07 13:52 ` Daniel Vetter
2016-01-07 13:30 ` [PATCH 4/5] drm: sti: fix cursor coordinates Benjamin Gaignard
2016-01-07 13:30 ` [PATCH 5/5] drm: sti: set DRIVER_ATOMIC for sti Benjamin Gaignard
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=20160107144720.GT8076@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=benjamin.gaignard@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabien.dessenne@st.com \
--cc=m.szyprowski@samsung.com \
--cc=vincent.abriou@st.com \
/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