All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: rcar-du: Lift z-pos restriction on primary plane for Gen3
@ 2022-06-09 23:55 Laurent Pinchart
  2022-06-13  2:26   ` Esaki Tomohito
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2022-06-09 23:55 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-renesas-soc, Kieran Bingham

There's no reason to require the primary plane to always be at the
bottom of the stack, as the VSP supports arbitrary ordering of planes,
and the KMS API doesn't have such a requirement either. Lift the
restriction.

As the primary plane can now be positioned arbitrarily, enable control
of its alpha channel as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index 6b535abd799a..356861de17b0 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -431,14 +431,9 @@ 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) {
-			drm_plane_create_zpos_immutable_property(&plane->plane,
-								 0);
-		} else {
-			drm_plane_create_alpha_property(&plane->plane);
-			drm_plane_create_zpos_property(&plane->plane, 1, 1,
-						       num_planes - 1);
-		}
+		drm_plane_create_alpha_property(&plane->plane);
+		drm_plane_create_zpos_property(&plane->plane, i, 0,
+					       num_planes - 1);
 
 		vsp->num_planes++;
 	}

base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
-- 
Regards,

Laurent Pinchart


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: rcar-du: Lift z-pos restriction on primary plane for Gen3
  2022-06-09 23:55 [PATCH] drm: rcar-du: Lift z-pos restriction on primary plane for Gen3 Laurent Pinchart
@ 2022-06-13  2:26   ` Esaki Tomohito
  0 siblings, 0 replies; 3+ messages in thread
From: Esaki Tomohito @ 2022-06-13  2:26 UTC (permalink / raw)
  To: Laurent Pinchart, dri-devel
  Cc: linux-renesas-soc, Kieran Bingham, Takanari Hayama

Hi, Laurent-san

I tested this patch by kms-tests scripts and modetest on R-Car Gen3.

On 2022/06/10 8:55, Laurent Pinchart wrote:
> There's no reason to require the primary plane to always be at the
> bottom of the stack, as the VSP supports arbitrary ordering of planes,
> and the KMS API doesn't have such a requirement either. Lift the
> restriction.
> 
> As the primary plane can now be positioned arbitrarily, enable control
> of its alpha channel as well.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Tested-by: Tomohito Esaki <etom@igel.co.jp>

> ---
>   drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> index 6b535abd799a..356861de17b0 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -431,14 +431,9 @@ 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) {
> -			drm_plane_create_zpos_immutable_property(&plane->plane,
> -								 0);
> -		} else {
> -			drm_plane_create_alpha_property(&plane->plane);
> -			drm_plane_create_zpos_property(&plane->plane, 1, 1,
> -						       num_planes - 1);
> -		}
> +		drm_plane_create_alpha_property(&plane->plane);
> +		drm_plane_create_zpos_property(&plane->plane, i, 0,
> +					       num_planes - 1);
>   
>   		vsp->num_planes++;
>   	}
> 
> base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56

--
Best regards,
Tomohito Esaki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: rcar-du: Lift z-pos restriction on primary plane for Gen3
@ 2022-06-13  2:26   ` Esaki Tomohito
  0 siblings, 0 replies; 3+ messages in thread
From: Esaki Tomohito @ 2022-06-13  2:26 UTC (permalink / raw)
  To: Laurent Pinchart, dri-devel
  Cc: linux-renesas-soc, Takanari Hayama, Kieran Bingham

Hi, Laurent-san

I tested this patch by kms-tests scripts and modetest on R-Car Gen3.

On 2022/06/10 8:55, Laurent Pinchart wrote:
> There's no reason to require the primary plane to always be at the
> bottom of the stack, as the VSP supports arbitrary ordering of planes,
> and the KMS API doesn't have such a requirement either. Lift the
> restriction.
> 
> As the primary plane can now be positioned arbitrarily, enable control
> of its alpha channel as well.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Tested-by: Tomohito Esaki <etom@igel.co.jp>

> ---
>   drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> index 6b535abd799a..356861de17b0 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -431,14 +431,9 @@ 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) {
> -			drm_plane_create_zpos_immutable_property(&plane->plane,
> -								 0);
> -		} else {
> -			drm_plane_create_alpha_property(&plane->plane);
> -			drm_plane_create_zpos_property(&plane->plane, 1, 1,
> -						       num_planes - 1);
> -		}
> +		drm_plane_create_alpha_property(&plane->plane);
> +		drm_plane_create_zpos_property(&plane->plane, i, 0,
> +					       num_planes - 1);
>   
>   		vsp->num_planes++;
>   	}
> 
> base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56

--
Best regards,
Tomohito Esaki

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-13  2:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 23:55 [PATCH] drm: rcar-du: Lift z-pos restriction on primary plane for Gen3 Laurent Pinchart
2022-06-13  2:26 ` Esaki Tomohito
2022-06-13  2:26   ` Esaki Tomohito

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.