[PATCH 2/5] drm: sti: add atomic get/set properties for planes

Benjamin Gaignard benjamin.gaignard at linaro.org
Thu Jan 7 06:05:02 PST 2016


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...

Benjamin


2016-01-07 14:50 GMT+01:00 Daniel Vetter <daniel at 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 at 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 at 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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20160107/3abdde43/attachment-0001.html>


More information about the dri-devel mailing list