<div dir="ltr">zpos property isn't new in sti driver only the atomic set/get functions are new.<div>Without those functions atomictest failed to discover any of the other atomic planes properties.</div><div><br></div><div>I agree with you, zpos should be generic and I could work with Marek for that</div><div>but if this patch isn't merge sti atomic modesetting support will be limited to primary planes...</div><div><br></div><div>Benjamin</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-07 14:50 GMT+01:00 Daniel Vetter <span dir="ltr"><<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Jan 07, 2016 at 02:30:38PM +0100, Benjamin Gaignard wrote:<br>
> Without those function zpos property isn't displayed in atomic mode.<br>
><br>
> Signed-off-by: Benjamin Gaignard <<a href="mailto:benjamin.gaignard@linaro.org">benjamin.gaignard@linaro.org</a>><br>
<br>
</span>Oh, another iteration of a driver-private zpos property. This _really_<br>
should be generic, with some consistent cross-driver semantics. Marek from<br>
samsung has started with a patch series for that.<br>
<br>
Can you please work together with him, and rebase the sti zpos support on<br>
top of his work? And hold of this patch for now meanwhile?<br>
<br>
Also adding Marek.<br>
<br>
Thanks, Daniel<br>
<div><div class="h5"><br>
> ---<br>
>  drivers/gpu/drm/sti/sti_plane.c | 40 ++++++++++++++++++++++++++++++++++++++++<br>
>  1 file changed, 40 insertions(+)<br>
><br>
> diff --git a/drivers/gpu/drm/sti/sti_plane.c b/drivers/gpu/drm/sti/sti_plane.c<br>
> index 2e5c751..e739c5a 100644<br>
> --- a/drivers/gpu/drm/sti/sti_plane.c<br>
> +++ b/drivers/gpu/drm/sti/sti_plane.c<br>
> @@ -69,6 +69,44 @@ static int sti_plane_set_property(struct drm_plane *drm_plane,<br>
>       return -EINVAL;<br>
>  }<br>
><br>
> +static int sti_plane_atomic_set_property(struct drm_plane *drm_plane,<br>
> +                                      struct drm_plane_state *state,<br>
> +                                      struct drm_property *property,<br>
> +                                      uint64_t val)<br>
> +{<br>
> +     struct drm_device *dev = drm_plane->dev;<br>
> +     struct sti_private *private = dev->dev_private;<br>
> +     struct sti_plane *plane = to_sti_plane(drm_plane);<br>
> +<br>
> +     DRM_DEBUG_DRIVER("\n");<br>
> +<br>
> +     if (property == private->plane_zorder_property) {<br>
> +             plane->zorder = val;<br>
> +             return 0;<br>
> +     }<br>
> +<br>
> +     return -EINVAL;<br>
> +}<br>
> +<br>
> +static int sti_plane_atomic_get_property(struct drm_plane *drm_plane,<br>
> +                                      const struct drm_plane_state *state,<br>
> +                                      struct drm_property *property,<br>
> +                                      uint64_t *val)<br>
> +{<br>
> +     struct drm_device *dev = drm_plane->dev;<br>
> +     struct sti_private *private = dev->dev_private;<br>
> +     struct sti_plane *plane = to_sti_plane(drm_plane);<br>
> +<br>
> +     DRM_DEBUG_DRIVER("\n");<br>
> +<br>
> +     if (property == private->plane_zorder_property) {<br>
> +             *val = plane->zorder;<br>
> +             return 0;<br>
> +     }<br>
> +<br>
> +     return -EINVAL;<br>
> +}<br>
> +<br>
>  static void sti_plane_attach_zorder_property(struct drm_plane *drm_plane)<br>
>  {<br>
>       struct drm_device *dev = drm_plane->dev;<br>
> @@ -116,4 +154,6 @@ struct drm_plane_funcs sti_plane_helpers_funcs = {<br>
>       .reset = drm_atomic_helper_plane_reset,<br>
>       .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,<br>
>       .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,<br>
> +     .atomic_set_property = sti_plane_atomic_set_property,<br>
> +     .atomic_get_property = sti_plane_atomic_get_property,<br>
>  };<br>
> --<br>
> 1.9.1<br>
><br>
</div></div>> _______________________________________________<br>
> dri-devel mailing list<br>
> <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Daniel Vetter<br>
Software Engineer, Intel Corporation<br>
<a href="http://blog.ffwll.ch" rel="noreferrer" target="_blank">http://blog.ffwll.ch</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">Benjamin Gaignard </p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">Graphic Working Group</p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span lang="EN-US" style="font-size:10pt;color:rgb(0,176,80)"><span style="color:rgb(0,68,252)"><a href="http://www.linaro.org/" style="color:rgb(0,0,204)" target="_blank">Linaro.org</a></span><b> </b></span><b><span lang="EN-US" style="font-size:10pt">│ </span></b><span lang="EN-US" style="font-size:10pt">Open source software for ARM SoCs</span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><u></u></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span lang="EN-US" style="font-size:10pt">Follow <b>Linaro: </b></span><span style="font-size:10pt;color:rgb(0,68,252)"><a href="http://www.facebook.com/pages/Linaro" style="color:rgb(0,0,204)" target="_blank"><span style="color:blue">Facebook</span></a></span><span style="font-size:10pt"> | <span style="color:rgb(0,68,252)"><a href="http://twitter.com/#!/linaroorg" style="color:rgb(0,0,204)" target="_blank"><span style="color:blue">Twitter</span></a></span> | <span style="color:rgb(0,68,252)"><a href="http://www.linaro.org/linaro-blog/" style="color:rgb(0,0,204)" target="_blank"><span style="color:blue">Blog</span></a></span></span></p></span></div>
</div>