diff mbox series

[2/2] drm:rcar-du: Enable ABGR and XBGR formats

Message ID 20230728200714.2084223-2-dhobsong@igel.co.jp (mailing list archive)
State Mainlined
Commit 97018453946bbca869640d92c19400b17e61b94b
Delegated to: Kieran Bingham
Headers show
Series [1/2] drm: rcar-du: Add more formats to DRM_MODE_BLEND_PIXEL_NONE support | expand

Commit Message

Damian Hobson-Garcia July 28, 2023, 8:07 p.m. UTC
These formats are used by Android so having them available
allows the DU to be used for composition operations.

Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
---
 drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Laurent Pinchart Aug. 3, 2023, 11:49 p.m. UTC | #1
Hi Damian,

Thank you for the patch.

On Fri, Jul 28, 2023 at 04:07:14PM -0400, Damian Hobson-Garcia wrote:
> These formats are used by Android so having them available
> allows the DU to be used for composition operations.
> 
> Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>

This looks good to me. I'm not sure why I haven't included them
initially.

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

> ---
>  drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c
> index 96241c03b60f..d61bb2e44c06 100644
> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c
> @@ -122,6 +122,8 @@ static const u32 rcar_du_vsp_formats[] = {
>  	DRM_FORMAT_RGB888,
>  	DRM_FORMAT_BGRA8888,
>  	DRM_FORMAT_BGRX8888,
> +	DRM_FORMAT_ABGR8888,
> +	DRM_FORMAT_XBGR8888,
>  	DRM_FORMAT_ARGB8888,
>  	DRM_FORMAT_XRGB8888,
>  	DRM_FORMAT_UYVY,
> @@ -154,6 +156,8 @@ static const u32 rcar_du_vsp_formats_gen4[] = {
>  	DRM_FORMAT_RGB888,
>  	DRM_FORMAT_BGRA8888,
>  	DRM_FORMAT_BGRX8888,
> +	DRM_FORMAT_ABGR8888,
> +	DRM_FORMAT_XBGR8888,
>  	DRM_FORMAT_ARGB8888,
>  	DRM_FORMAT_XRGB8888,
>  	DRM_FORMAT_RGBX1010102,
> @@ -194,6 +198,10 @@ static u32 rcar_du_vsp_state_get_format(struct rcar_du_vsp_plane_state *state)
>  			fourcc = DRM_FORMAT_XRGB8888;
>  			break;
>  
> +		case DRM_FORMAT_ABGR8888:
> +			fourcc = DRM_FORMAT_XBGR8888;
> +			break;
> +
>  		case DRM_FORMAT_BGRA8888:
>  			fourcc = DRM_FORMAT_BGRX8888;
>  			break;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c
index 96241c03b60f..d61bb2e44c06 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c
@@ -122,6 +122,8 @@  static const u32 rcar_du_vsp_formats[] = {
 	DRM_FORMAT_RGB888,
 	DRM_FORMAT_BGRA8888,
 	DRM_FORMAT_BGRX8888,
+	DRM_FORMAT_ABGR8888,
+	DRM_FORMAT_XBGR8888,
 	DRM_FORMAT_ARGB8888,
 	DRM_FORMAT_XRGB8888,
 	DRM_FORMAT_UYVY,
@@ -154,6 +156,8 @@  static const u32 rcar_du_vsp_formats_gen4[] = {
 	DRM_FORMAT_RGB888,
 	DRM_FORMAT_BGRA8888,
 	DRM_FORMAT_BGRX8888,
+	DRM_FORMAT_ABGR8888,
+	DRM_FORMAT_XBGR8888,
 	DRM_FORMAT_ARGB8888,
 	DRM_FORMAT_XRGB8888,
 	DRM_FORMAT_RGBX1010102,
@@ -194,6 +198,10 @@  static u32 rcar_du_vsp_state_get_format(struct rcar_du_vsp_plane_state *state)
 			fourcc = DRM_FORMAT_XRGB8888;
 			break;
 
+		case DRM_FORMAT_ABGR8888:
+			fourcc = DRM_FORMAT_XBGR8888;
+			break;
+
 		case DRM_FORMAT_BGRA8888:
 			fourcc = DRM_FORMAT_BGRX8888;
 			break;