Re: [PATCH] drm: rcar-du: Set primary plane zpos immutably at initializing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Esaki-san,

Thank you for the patch.

On Wed, Apr 01, 2020 at 03:11:00PM +0900, Tomohito Esaki wrote:
> According to drm_plane_create_zpos_property() function documentation,
> all planes zpos range should be set if zpos property is supported.
> However, the rcar-du driver didn't set primary plane zpos range. Since
> the primary plane's zpos is fixed, set i immutably.
> 
> Signed-off-by: Tomohito Esaki <etom@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_plane.c | 5 ++++-
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c   | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> index c6430027169f..9a499be45c45 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> @@ -785,8 +785,11 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp)
>  
>  		drm_plane_create_alpha_property(&plane->plane);
>  
> -		if (type == DRM_PLANE_TYPE_PRIMARY)
> +		if (type == DRM_PLANE_TYPE_PRIMARY) {
> +			drm_plane_create_zpos_immutable_property(&plane->plane,
> +								 0);
>  			continue;
> +		}

I would prefer an if ... else ... here and below instead of a continue,
to better handle future differences between primary and overlay planes.
Apart from that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

I've taken the liberty to resend the patch with this change as a v2,
with the dri-devel mailing list in CC, and will include it in my next
pull request.

Would you mind CC'ing me for future patches to the R-Car DU driver ? You
can use the scripts/get_maintainer.pl script from the Linux kernel
sources to get a list of maintainers, reviewers and mailing lists for a
patch. There's no need to CC everybody on that list, but it can give you
at least the driver's maintainer and the corresponding mailing list.

>  
>  		drm_object_attach_property(&plane->plane.base,
>  					   rcdu->props.colorkey,
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> index 5e4faf258c31..382b720edc09 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -392,8 +392,11 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
>  		drm_plane_helper_add(&plane->plane,
>  				     &rcar_du_vsp_plane_helper_funcs);
>  
> -		if (type == DRM_PLANE_TYPE_PRIMARY)
> +		if (type == DRM_PLANE_TYPE_PRIMARY) {
> +			drm_plane_create_zpos_immutable_property(&plane->plane,
> +								 0);
>  			continue;
> +		}
>  
>  		drm_plane_create_alpha_property(&plane->plane);
>  		drm_plane_create_zpos_property(&plane->plane, 1, 1,

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux