All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU
@ 2025-04-04 13:30 Biju Das
  2025-04-04 14:30 ` Tommaso Merciai
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Biju Das @ 2025-04-04 13:30 UTC (permalink / raw)
  To: Biju Das, Maarten Lankhorst, Kieran Bingham, Laurent Pinchart,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-renesas-soc, Geert Uytterhoeven, Tommaso Merciai,
	Prabhakar Mahadev Lad, Biju Das

Add support for zpos, alpha and blend properties to RZ/G2L DU
driver as the IP supports all these properties.

It is tested by the below modetest commands:

modetest -M rzg2l-du -s 44@42:1920x1080@AR24 -d -P \
37@42:512x300+200+200@XR15

modetest -M rzg2l-du -w {32,37}:alpha:{0,65535}
modetest -M rzg2l-du -w {32,37}:zpos:{0,1}

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
index 8643ff2eec46..040d4e4aff00 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
@@ -340,6 +340,15 @@ int rzg2l_du_vsp_init(struct rzg2l_du_vsp *vsp, struct device_node *np,
 
 		drm_plane_helper_add(&plane->plane,
 				     &rzg2l_du_vsp_plane_helper_funcs);
+
+		drm_plane_create_alpha_property(&plane->plane);
+		drm_plane_create_zpos_property(&plane->plane, i, 0,
+					       num_planes - 1);
+
+		drm_plane_create_blend_mode_property(&plane->plane,
+					BIT(DRM_MODE_BLEND_PIXEL_NONE) |
+					BIT(DRM_MODE_BLEND_PREMULTI) |
+					BIT(DRM_MODE_BLEND_COVERAGE));
 	}
 
 	return 0;
-- 
2.43.0


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

* Re: [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU
  2025-04-04 13:30 [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU Biju Das
@ 2025-04-04 14:30 ` Tommaso Merciai
  2025-04-04 20:56 ` Laurent Pinchart
  2025-04-07 17:03 ` Lad, Prabhakar
  2 siblings, 0 replies; 5+ messages in thread
From: Tommaso Merciai @ 2025-04-04 14:30 UTC (permalink / raw)
  To: Biju Das
  Cc: Maarten Lankhorst, Kieran Bingham, Laurent Pinchart,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, linux-renesas-soc, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, Biju Das

Hi Biju,

Thank you for the patch.

On Fri, Apr 04, 2025 at 02:30:45PM +0100, Biju Das wrote:
> Add support for zpos, alpha and blend properties to RZ/G2L DU
> driver as the IP supports all these properties.
> 
> It is tested by the below modetest commands:
> 
> modetest -M rzg2l-du -s 44@42:1920x1080@AR24 -d -P \
> 37@42:512x300+200+200@XR15
> 
> modetest -M rzg2l-du -w {32,37}:alpha:{0,65535}
> modetest -M rzg2l-du -w {32,37}:zpos:{0,1}

Tested on RZ/G3E SoC DU using:

modetest -M rzg2l-du -s 55@53:1920x1080@AR24 -d -P 47@53:512x300+200+200@XR15

modetest -M rzg2l-du -w 47:alpha:0
modetest -M rzg2l-du -w 47:alpha:65535

modetest -M rzg2l-du -w 47:zpos:0
modetest -M rzg2l-du -w 47:zpos:1


Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>

> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> index 8643ff2eec46..040d4e4aff00 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> @@ -340,6 +340,15 @@ int rzg2l_du_vsp_init(struct rzg2l_du_vsp *vsp, struct device_node *np,
>  
>  		drm_plane_helper_add(&plane->plane,
>  				     &rzg2l_du_vsp_plane_helper_funcs);
> +
> +		drm_plane_create_alpha_property(&plane->plane);
> +		drm_plane_create_zpos_property(&plane->plane, i, 0,
> +					       num_planes - 1);
> +
> +		drm_plane_create_blend_mode_property(&plane->plane,
> +					BIT(DRM_MODE_BLEND_PIXEL_NONE) |
> +					BIT(DRM_MODE_BLEND_PREMULTI) |
> +					BIT(DRM_MODE_BLEND_COVERAGE));
>  	}
>  
>  	return 0;
> -- 
> 2.43.0
> 
> 

Thanks & Regards,
Tommaso

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

* Re: [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU
  2025-04-04 13:30 [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU Biju Das
  2025-04-04 14:30 ` Tommaso Merciai
@ 2025-04-04 20:56 ` Laurent Pinchart
  2025-04-07 17:01   ` Biju Das
  2025-04-07 17:03 ` Lad, Prabhakar
  2 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2025-04-04 20:56 UTC (permalink / raw)
  To: Biju Das
  Cc: Maarten Lankhorst, Kieran Bingham, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, dri-devel,
	linux-renesas-soc, Geert Uytterhoeven, Tommaso Merciai,
	Prabhakar Mahadev Lad, Biju Das

Hi Biju,

Thank you for the patch.

On Fri, Apr 04, 2025 at 02:30:45PM +0100, Biju Das wrote:
> Add support for zpos, alpha and blend properties to RZ/G2L DU
> driver as the IP supports all these properties.
> 
> It is tested by the below modetest commands:
> 
> modetest -M rzg2l-du -s 44@42:1920x1080@AR24 -d -P \
> 37@42:512x300+200+200@XR15
> 
> modetest -M rzg2l-du -w {32,37}:alpha:{0,65535}
> modetest -M rzg2l-du -w {32,37}:zpos:{0,1}
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> index 8643ff2eec46..040d4e4aff00 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> @@ -340,6 +340,15 @@ int rzg2l_du_vsp_init(struct rzg2l_du_vsp *vsp, struct device_node *np,
>  
>  		drm_plane_helper_add(&plane->plane,
>  				     &rzg2l_du_vsp_plane_helper_funcs);
> +
> +		drm_plane_create_alpha_property(&plane->plane);
> +		drm_plane_create_zpos_property(&plane->plane, i, 0,
> +					       num_planes - 1);
> +
> +		drm_plane_create_blend_mode_property(&plane->plane,
> +					BIT(DRM_MODE_BLEND_PIXEL_NONE) |
> +					BIT(DRM_MODE_BLEND_PREMULTI) |
> +					BIT(DRM_MODE_BLEND_COVERAGE));

It's interesting that the driver already handles the alpha, zpos and
blend mode properties set in the state, but doesn't expose those
properties to userspace.

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

>  	}
>  
>  	return 0;

-- 
Regards,

Laurent Pinchart

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

* RE: [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU
  2025-04-04 20:56 ` Laurent Pinchart
@ 2025-04-07 17:01   ` Biju Das
  0 siblings, 0 replies; 5+ messages in thread
From: Biju Das @ 2025-04-07 17:01 UTC (permalink / raw)
  To: laurent.pinchart
  Cc: Maarten Lankhorst, Kieran Bingham, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven,
	Tommaso Merciai, Prabhakar Mahadev Lad, biju.das.au

Hi Laurent,

> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: 04 April 2025 21:57
> Subject: Re: [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU
> 
> Hi Biju,
> 
> Thank you for the patch.
> 
> On Fri, Apr 04, 2025 at 02:30:45PM +0100, Biju Das wrote:
> > Add support for zpos, alpha and blend properties to RZ/G2L DU driver
> > as the IP supports all these properties.
> >
> > It is tested by the below modetest commands:
> >
> > modetest -M rzg2l-du -s 44@42:1920x1080@AR24 -d -P \
> > 37@42:512x300+200+200@XR15
> >
> > modetest -M rzg2l-du -w {32,37}:alpha:{0,65535} modetest -M rzg2l-du
> > -w {32,37}:zpos:{0,1}
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> >  drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> > b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> > index 8643ff2eec46..040d4e4aff00 100644
> > --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> > +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> > @@ -340,6 +340,15 @@ int rzg2l_du_vsp_init(struct rzg2l_du_vsp *vsp,
> > struct device_node *np,
> >
> >  		drm_plane_helper_add(&plane->plane,
> >  				     &rzg2l_du_vsp_plane_helper_funcs);
> > +
> > +		drm_plane_create_alpha_property(&plane->plane);
> > +		drm_plane_create_zpos_property(&plane->plane, i, 0,
> > +					       num_planes - 1);
> > +
> > +		drm_plane_create_blend_mode_property(&plane->plane,
> > +					BIT(DRM_MODE_BLEND_PIXEL_NONE) |
> > +					BIT(DRM_MODE_BLEND_PREMULTI) |
> > +					BIT(DRM_MODE_BLEND_COVERAGE));
> 
> It's interesting that the driver already handles the alpha, zpos and blend mode properties set in the
> state, but doesn't expose those properties to userspace.

Yes, somehow missed adding alpha, zpos and blend property.

Cheers,
Biju

> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> 
> >  	}
> >
> >  	return 0;
> 
> --
> Regards,
> 
> Laurent Pinchart

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

* Re: [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU
  2025-04-04 13:30 [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU Biju Das
  2025-04-04 14:30 ` Tommaso Merciai
  2025-04-04 20:56 ` Laurent Pinchart
@ 2025-04-07 17:03 ` Lad, Prabhakar
  2 siblings, 0 replies; 5+ messages in thread
From: Lad, Prabhakar @ 2025-04-07 17:03 UTC (permalink / raw)
  To: Biju Das
  Cc: Maarten Lankhorst, Kieran Bingham, Laurent Pinchart,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, linux-renesas-soc, Geert Uytterhoeven, Tommaso Merciai,
	Prabhakar Mahadev Lad, Biju Das

On Fri, Apr 4, 2025 at 2:32 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
>
> Add support for zpos, alpha and blend properties to RZ/G2L DU
> driver as the IP supports all these properties.
>
> It is tested by the below modetest commands:
>
> modetest -M rzg2l-du -s 44@42:1920x1080@AR24 -d -P \
> 37@42:512x300+200+200@XR15
>
> modetest -M rzg2l-du -w {32,37}:alpha:{0,65535}
> modetest -M rzg2l-du -w {32,37}:zpos:{0,1}
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> #On RZ/V2H

Cheers,
Prabhakar

> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> index 8643ff2eec46..040d4e4aff00 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
> @@ -340,6 +340,15 @@ int rzg2l_du_vsp_init(struct rzg2l_du_vsp *vsp, struct device_node *np,
>
>                 drm_plane_helper_add(&plane->plane,
>                                      &rzg2l_du_vsp_plane_helper_funcs);
> +
> +               drm_plane_create_alpha_property(&plane->plane);
> +               drm_plane_create_zpos_property(&plane->plane, i, 0,
> +                                              num_planes - 1);
> +
> +               drm_plane_create_blend_mode_property(&plane->plane,
> +                                       BIT(DRM_MODE_BLEND_PIXEL_NONE) |
> +                                       BIT(DRM_MODE_BLEND_PREMULTI) |
> +                                       BIT(DRM_MODE_BLEND_COVERAGE));
>         }
>
>         return 0;
> --
> 2.43.0
>
>

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

end of thread, other threads:[~2025-04-07 17:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 13:30 [PATCH] drm: renesas: Add zpos, alpha and blend properties to RZ/G2L DU Biju Das
2025-04-04 14:30 ` Tommaso Merciai
2025-04-04 20:56 ` Laurent Pinchart
2025-04-07 17:01   ` Biju Das
2025-04-07 17:03 ` Lad, Prabhakar

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.