[PATCH] drm: rcar-du: Create immutable zpos property for primary planes
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat Apr 4 18:25:40 UTC 2020
Hi Geert,
On Thu, Apr 02, 2020 at 01:12:51PM +0200, Geert Uytterhoeven wrote:
> On Thu, Apr 2, 2020 at 12:42 PM Laurent Pinchart wrote:
> > The R-Car DU driver creates a zpos property, ranging from 1 to 7, for
> > all the overlay planes, but leaves the primary plane without a zpos
> > property. The DRM/KMS API doesn't clearly specify if this is acceptable,
> > of it the property is mandatory for all planes when exposed for some of
> > the planes. Nonetheless, weston v8.0 has been reported to have trouble
> > handling this situation.
> >
> > The DRM core offers support for immutable zpos properties. Creating an
> > immutable zpos property set to 0 for the primary planes seems to be a
> > good way forward, as it shouldn't introduce any regression, and can fix
> > the issue. Do so.
> >
> > Reported-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
>
> Thanks for your patch!
>
> > --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> > +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> > @@ -785,13 +785,15 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp)
> >
> > drm_plane_create_alpha_property(&plane->plane);
> >
> > - if (type == DRM_PLANE_TYPE_PRIMARY)
> > - continue;
> > -
> > - drm_object_attach_property(&plane->plane.base,
> > - rcdu->props.colorkey,
> > - RCAR_DU_COLORKEY_NONE);
> > - drm_plane_create_zpos_property(&plane->plane, 1, 1, 7);
> > + if (type == DRM_PLANE_TYPE_PRIMARY) {
> > + drm_plane_create_zpos_immutable_property(&plane->plane,
> > + 0);
> > + } else {
> > + drm_object_attach_property(&plane->plane.base,
> > + rcdu->props.colorkey,
> > + RCAR_DU_COLORKEY_NONE);
> > + drm_plane_create_zpos_property(&plane->plane, 1, 1, 7);
> > + }
> > }
> >
> > return 0;
>
> This is very similar to Esaki-san's patch[*] posted yesterday.
Thank you for pointing me to it, I had missed that patch.
> However, there's one big difference: your patch doesn't update
> rcar_du_vsp_init(). Isn't that needed?
>
> [*] "[PATCH] drm: rcar-du: Set primary plane zpos immutably at initializing"
> https://lore.kernel.org/linux-renesas-soc/20200401061100.7379-1-etom@igel.co.jp/
My bad. I've sent a v2 of Esaki-san's patch to CC the dri-devel mailing
list, and have applied it to my tree.
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list