mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/verisilicon: add primary modifier for format tables
@ 2026-09-10  9:49 Icenowy Zheng
  2026-09-10  9:50 ` [PATCH 2/2] drm/verisilicon: remove ARGB formats from primary plane Icenowy Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Icenowy Zheng @ 2026-09-10  9:49 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel,
	Icenowy Zheng, Icenowy Zheng

Currently the format tables are only used for the primary plane.

Add primary modifiers to names related to the tables.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
 drivers/gpu/drm/verisilicon/vs_hwdb.c          | 12 ++++++------
 drivers/gpu/drm/verisilicon/vs_hwdb.h          |  4 ++--
 drivers/gpu/drm/verisilicon/vs_primary_plane.c |  4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.c b/drivers/gpu/drm/verisilicon/vs_hwdb.c
index 2a0f7c59afa3a..56aa450443068 100644
--- a/drivers/gpu/drm/verisilicon/vs_hwdb.c
+++ b/drivers/gpu/drm/verisilicon/vs_hwdb.c
@@ -10,7 +10,7 @@
 #include "vs_dc_top_regs.h"
 #include "vs_hwdb.h"
 
-static const u32 vs_formats_array_no_yuv444[] = {
+static const u32 vs_primary_formats_array_no_yuv444[] = {
 	DRM_FORMAT_XRGB4444,
 	DRM_FORMAT_XBGR4444,
 	DRM_FORMAT_RGBX4444,
@@ -44,7 +44,7 @@ static const u32 vs_formats_array_no_yuv444[] = {
 	/* TODO: non-RGB formats */
 };
 
-static const u32 vs_formats_array_with_yuv444[] = {
+static const u32 vs_primary_formats_array_with_yuv444[] = {
 	DRM_FORMAT_XRGB4444,
 	DRM_FORMAT_XBGR4444,
 	DRM_FORMAT_RGBX4444,
@@ -79,13 +79,13 @@ static const u32 vs_formats_array_with_yuv444[] = {
 };
 
 static const struct vs_formats vs_formats_no_yuv444 = {
-	.array = vs_formats_array_no_yuv444,
-	.num = ARRAY_SIZE(vs_formats_array_no_yuv444)
+	.primary_array = vs_primary_formats_array_no_yuv444,
+	.primary_num = ARRAY_SIZE(vs_primary_formats_array_no_yuv444)
 };
 
 static const struct vs_formats vs_formats_with_yuv444 = {
-	.array = vs_formats_array_with_yuv444,
-	.num = ARRAY_SIZE(vs_formats_array_with_yuv444)
+	.primary_array = vs_primary_formats_array_with_yuv444,
+	.primary_num = ARRAY_SIZE(vs_primary_formats_array_with_yuv444)
 };
 
 static struct vs_chip_identity vs_chip_identities[] = {
diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.h b/drivers/gpu/drm/verisilicon/vs_hwdb.h
index 2065ecb730437..616076d931a57 100644
--- a/drivers/gpu/drm/verisilicon/vs_hwdb.h
+++ b/drivers/gpu/drm/verisilicon/vs_hwdb.h
@@ -10,8 +10,8 @@
 #include <linux/types.h>
 
 struct vs_formats {
-	const u32 *array;
-	unsigned int num;
+	const u32 *primary_array;
+	unsigned int primary_num;
 };
 
 struct vs_chip_identity {
diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
index 1f2be41ae496c..8e94491693019 100644
--- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
+++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
@@ -168,8 +168,8 @@ struct drm_plane *vs_primary_plane_init(struct drm_device *drm_dev, struct vs_dc
 
 	plane = drmm_universal_plane_alloc(drm_dev, struct drm_plane, dev, 0,
 					   &vs_primary_plane_funcs,
-					   dc->identity.formats->array,
-					   dc->identity.formats->num,
+					   dc->identity.formats->primary_array,
+					   dc->identity.formats->primary_num,
 					   NULL,
 					   DRM_PLANE_TYPE_PRIMARY,
 					   NULL);
-- 
2.52.0


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

* [PATCH 2/2] drm/verisilicon: remove ARGB formats from primary plane
  2026-09-10  9:49 [PATCH 1/2] drm/verisilicon: add primary modifier for format tables Icenowy Zheng
@ 2026-09-10  9:50 ` Icenowy Zheng
  2026-09-10 11:03 ` [PATCH 1/2] drm/verisilicon: add primary modifier for format tables Thomas Zimmermann
  2026-09-16 10:01 ` Icenowy Zheng
  2 siblings, 0 replies; 4+ messages in thread
From: Icenowy Zheng @ 2026-09-10  9:50 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel,
	Icenowy Zheng, Icenowy Zheng

As the blending of the primary plane is currently explicitly disabled
(and it's not possible on DC8000), remove the ARGB formats from the
primary plane format tables.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
 drivers/gpu/drm/verisilicon/vs_hwdb.c | 32 ---------------------------
 1 file changed, 32 deletions(-)

diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.c b/drivers/gpu/drm/verisilicon/vs_hwdb.c
index 56aa450443068..ebf6f843bc885 100644
--- a/drivers/gpu/drm/verisilicon/vs_hwdb.c
+++ b/drivers/gpu/drm/verisilicon/vs_hwdb.c
@@ -15,32 +15,16 @@ static const u32 vs_primary_formats_array_no_yuv444[] = {
 	DRM_FORMAT_XBGR4444,
 	DRM_FORMAT_RGBX4444,
 	DRM_FORMAT_BGRX4444,
-	DRM_FORMAT_ARGB4444,
-	DRM_FORMAT_ABGR4444,
-	DRM_FORMAT_RGBA4444,
-	DRM_FORMAT_BGRA4444,
 	DRM_FORMAT_XRGB1555,
 	DRM_FORMAT_XBGR1555,
 	DRM_FORMAT_RGBX5551,
 	DRM_FORMAT_BGRX5551,
-	DRM_FORMAT_ARGB1555,
-	DRM_FORMAT_ABGR1555,
-	DRM_FORMAT_RGBA5551,
-	DRM_FORMAT_BGRA5551,
 	DRM_FORMAT_RGB565,
 	DRM_FORMAT_BGR565,
 	DRM_FORMAT_XRGB8888,
 	DRM_FORMAT_XBGR8888,
 	DRM_FORMAT_RGBX8888,
 	DRM_FORMAT_BGRX8888,
-	DRM_FORMAT_ARGB8888,
-	DRM_FORMAT_ABGR8888,
-	DRM_FORMAT_RGBA8888,
-	DRM_FORMAT_BGRA8888,
-	DRM_FORMAT_ARGB2101010,
-	DRM_FORMAT_ABGR2101010,
-	DRM_FORMAT_RGBA1010102,
-	DRM_FORMAT_BGRA1010102,
 	/* TODO: non-RGB formats */
 };
 
@@ -49,32 +33,16 @@ static const u32 vs_primary_formats_array_with_yuv444[] = {
 	DRM_FORMAT_XBGR4444,
 	DRM_FORMAT_RGBX4444,
 	DRM_FORMAT_BGRX4444,
-	DRM_FORMAT_ARGB4444,
-	DRM_FORMAT_ABGR4444,
-	DRM_FORMAT_RGBA4444,
-	DRM_FORMAT_BGRA4444,
 	DRM_FORMAT_XRGB1555,
 	DRM_FORMAT_XBGR1555,
 	DRM_FORMAT_RGBX5551,
 	DRM_FORMAT_BGRX5551,
-	DRM_FORMAT_ARGB1555,
-	DRM_FORMAT_ABGR1555,
-	DRM_FORMAT_RGBA5551,
-	DRM_FORMAT_BGRA5551,
 	DRM_FORMAT_RGB565,
 	DRM_FORMAT_BGR565,
 	DRM_FORMAT_XRGB8888,
 	DRM_FORMAT_XBGR8888,
 	DRM_FORMAT_RGBX8888,
 	DRM_FORMAT_BGRX8888,
-	DRM_FORMAT_ARGB8888,
-	DRM_FORMAT_ABGR8888,
-	DRM_FORMAT_RGBA8888,
-	DRM_FORMAT_BGRA8888,
-	DRM_FORMAT_ARGB2101010,
-	DRM_FORMAT_ABGR2101010,
-	DRM_FORMAT_RGBA1010102,
-	DRM_FORMAT_BGRA1010102,
 	/* TODO: non-RGB formats */
 };
 
-- 
2.52.0


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

* Re: [PATCH 1/2] drm/verisilicon: add primary modifier for format tables
  2026-09-10  9:49 [PATCH 1/2] drm/verisilicon: add primary modifier for format tables Icenowy Zheng
  2026-09-10  9:50 ` [PATCH 2/2] drm/verisilicon: remove ARGB formats from primary plane Icenowy Zheng
@ 2026-09-10 11:03 ` Thomas Zimmermann
  2026-09-16 10:01 ` Icenowy Zheng
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2026-09-10 11:03 UTC (permalink / raw)
  To: Icenowy Zheng, Maarten Lankhorst, Maxime Ripard
  Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel, Icenowy Zheng

Hi

Am 10.09.26 um 11:49 schrieb Icenowy Zheng:
> Currently the format tables are only used for the primary plane.
>
> Add primary modifiers to names related to the tables.
>
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

for both patches.

> ---
>   drivers/gpu/drm/verisilicon/vs_hwdb.c          | 12 ++++++------
>   drivers/gpu/drm/verisilicon/vs_hwdb.h          |  4 ++--
>   drivers/gpu/drm/verisilicon/vs_primary_plane.c |  4 ++--
>   3 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.c b/drivers/gpu/drm/verisilicon/vs_hwdb.c
> index 2a0f7c59afa3a..56aa450443068 100644
> --- a/drivers/gpu/drm/verisilicon/vs_hwdb.c
> +++ b/drivers/gpu/drm/verisilicon/vs_hwdb.c
> @@ -10,7 +10,7 @@
>   #include "vs_dc_top_regs.h"
>   #include "vs_hwdb.h"
>   
> -static const u32 vs_formats_array_no_yuv444[] = {
> +static const u32 vs_primary_formats_array_no_yuv444[] = {
>   	DRM_FORMAT_XRGB4444,
>   	DRM_FORMAT_XBGR4444,
>   	DRM_FORMAT_RGBX4444,
> @@ -44,7 +44,7 @@ static const u32 vs_formats_array_no_yuv444[] = {
>   	/* TODO: non-RGB formats */
>   };
>   
> -static const u32 vs_formats_array_with_yuv444[] = {
> +static const u32 vs_primary_formats_array_with_yuv444[] = {
>   	DRM_FORMAT_XRGB4444,
>   	DRM_FORMAT_XBGR4444,
>   	DRM_FORMAT_RGBX4444,
> @@ -79,13 +79,13 @@ static const u32 vs_formats_array_with_yuv444[] = {
>   };
>   
>   static const struct vs_formats vs_formats_no_yuv444 = {
> -	.array = vs_formats_array_no_yuv444,
> -	.num = ARRAY_SIZE(vs_formats_array_no_yuv444)
> +	.primary_array = vs_primary_formats_array_no_yuv444,
> +	.primary_num = ARRAY_SIZE(vs_primary_formats_array_no_yuv444)
>   };
>   
>   static const struct vs_formats vs_formats_with_yuv444 = {
> -	.array = vs_formats_array_with_yuv444,
> -	.num = ARRAY_SIZE(vs_formats_array_with_yuv444)
> +	.primary_array = vs_primary_formats_array_with_yuv444,
> +	.primary_num = ARRAY_SIZE(vs_primary_formats_array_with_yuv444)
>   };
>   
>   static struct vs_chip_identity vs_chip_identities[] = {
> diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.h b/drivers/gpu/drm/verisilicon/vs_hwdb.h
> index 2065ecb730437..616076d931a57 100644
> --- a/drivers/gpu/drm/verisilicon/vs_hwdb.h
> +++ b/drivers/gpu/drm/verisilicon/vs_hwdb.h
> @@ -10,8 +10,8 @@
>   #include <linux/types.h>
>   
>   struct vs_formats {
> -	const u32 *array;
> -	unsigned int num;
> +	const u32 *primary_array;
> +	unsigned int primary_num;
>   };
>   
>   struct vs_chip_identity {
> diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> index 1f2be41ae496c..8e94491693019 100644
> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> @@ -168,8 +168,8 @@ struct drm_plane *vs_primary_plane_init(struct drm_device *drm_dev, struct vs_dc
>   
>   	plane = drmm_universal_plane_alloc(drm_dev, struct drm_plane, dev, 0,
>   					   &vs_primary_plane_funcs,
> -					   dc->identity.formats->array,
> -					   dc->identity.formats->num,
> +					   dc->identity.formats->primary_array,
> +					   dc->identity.formats->primary_num,
>   					   NULL,
>   					   DRM_PLANE_TYPE_PRIMARY,
>   					   NULL);

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)



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

* Re: [PATCH 1/2] drm/verisilicon: add primary modifier for format tables
  2026-09-10  9:49 [PATCH 1/2] drm/verisilicon: add primary modifier for format tables Icenowy Zheng
  2026-09-10  9:50 ` [PATCH 2/2] drm/verisilicon: remove ARGB formats from primary plane Icenowy Zheng
  2026-09-10 11:03 ` [PATCH 1/2] drm/verisilicon: add primary modifier for format tables Thomas Zimmermann
@ 2026-09-16 10:01 ` Icenowy Zheng
  2 siblings, 0 replies; 4+ messages in thread
From: Icenowy Zheng @ 2026-09-16 10:01 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: David Airlie, Simona Vetter, dri-devel, linux-kernel

在 2026-09-10四的 17:49 +0800,Icenowy Zheng写道:
> Currently the format tables are only used for the primary plane.
> 
> Add primary modifiers to names related to the tables.
> 
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>

Applied (the whole patchset) onto drm-misc-fixes.

Thanks,
Icenowy

> ---
>  drivers/gpu/drm/verisilicon/vs_hwdb.c          | 12 ++++++------
>  drivers/gpu/drm/verisilicon/vs_hwdb.h          |  4 ++--
>  drivers/gpu/drm/verisilicon/vs_primary_plane.c |  4 ++--
>  3 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.c
> b/drivers/gpu/drm/verisilicon/vs_hwdb.c
> index 2a0f7c59afa3a..56aa450443068 100644
> --- a/drivers/gpu/drm/verisilicon/vs_hwdb.c
> +++ b/drivers/gpu/drm/verisilicon/vs_hwdb.c
> @@ -10,7 +10,7 @@
>  #include "vs_dc_top_regs.h"
>  #include "vs_hwdb.h"
>  
> -static const u32 vs_formats_array_no_yuv444[] = {
> +static const u32 vs_primary_formats_array_no_yuv444[] = {
>  	DRM_FORMAT_XRGB4444,
>  	DRM_FORMAT_XBGR4444,
>  	DRM_FORMAT_RGBX4444,
> @@ -44,7 +44,7 @@ static const u32 vs_formats_array_no_yuv444[] = {
>  	/* TODO: non-RGB formats */
>  };
>  
> -static const u32 vs_formats_array_with_yuv444[] = {
> +static const u32 vs_primary_formats_array_with_yuv444[] = {
>  	DRM_FORMAT_XRGB4444,
>  	DRM_FORMAT_XBGR4444,
>  	DRM_FORMAT_RGBX4444,
> @@ -79,13 +79,13 @@ static const u32 vs_formats_array_with_yuv444[] =
> {
>  };
>  
>  static const struct vs_formats vs_formats_no_yuv444 = {
> -	.array = vs_formats_array_no_yuv444,
> -	.num = ARRAY_SIZE(vs_formats_array_no_yuv444)
> +	.primary_array = vs_primary_formats_array_no_yuv444,
> +	.primary_num =
> ARRAY_SIZE(vs_primary_formats_array_no_yuv444)
>  };
>  
>  static const struct vs_formats vs_formats_with_yuv444 = {
> -	.array = vs_formats_array_with_yuv444,
> -	.num = ARRAY_SIZE(vs_formats_array_with_yuv444)
> +	.primary_array = vs_primary_formats_array_with_yuv444,
> +	.primary_num =
> ARRAY_SIZE(vs_primary_formats_array_with_yuv444)
>  };
>  
>  static struct vs_chip_identity vs_chip_identities[] = {
> diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.h
> b/drivers/gpu/drm/verisilicon/vs_hwdb.h
> index 2065ecb730437..616076d931a57 100644
> --- a/drivers/gpu/drm/verisilicon/vs_hwdb.h
> +++ b/drivers/gpu/drm/verisilicon/vs_hwdb.h
> @@ -10,8 +10,8 @@
>  #include <linux/types.h>
>  
>  struct vs_formats {
> -	const u32 *array;
> -	unsigned int num;
> +	const u32 *primary_array;
> +	unsigned int primary_num;
>  };
>  
>  struct vs_chip_identity {
> diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> index 1f2be41ae496c..8e94491693019 100644
> --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c
> @@ -168,8 +168,8 @@ struct drm_plane *vs_primary_plane_init(struct
> drm_device *drm_dev, struct vs_dc
>  
>  	plane = drmm_universal_plane_alloc(drm_dev, struct
> drm_plane, dev, 0,
>  					   &vs_primary_plane_funcs,
> -					   dc->identity.formats-
> >array,
> -					   dc->identity.formats-
> >num,
> +					   dc->identity.formats-
> >primary_array,
> +					   dc->identity.formats-
> >primary_num,
>  					   NULL,
>  					   DRM_PLANE_TYPE_PRIMARY,
>  					   NULL);


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

end of thread, other threads:[~2026-09-16 10:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10  9:49 [PATCH 1/2] drm/verisilicon: add primary modifier for format tables Icenowy Zheng
2026-09-10  9:50 ` [PATCH 2/2] drm/verisilicon: remove ARGB formats from primary plane Icenowy Zheng
2026-09-10 11:03 ` [PATCH 1/2] drm/verisilicon: add primary modifier for format tables Thomas Zimmermann
2026-09-16 10:01 ` Icenowy Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®