Hi

Am 09.03.26 um 09:53 schrieb Icenowy Zheng:
Different display controller variants support different maximum cursor
size. All known DC8200 variants support both 32x32 and 64x64, but some
DC8000 variants support either only 32x32 or up to 256x256.

The minimum size is fixed at 32 and only PoT square sizes are supported.

Add the max cursor size field to HWDB and fill all entries with 64.

Signed-off-by: Icenowy Zheng <[email protected]>
---
  drivers/gpu/drm/verisilicon/vs_hwdb.c | 4 ++++
  drivers/gpu/drm/verisilicon/vs_hwdb.h | 1 +
  2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.c 
b/drivers/gpu/drm/verisilicon/vs_hwdb.c
index 09336af0900ae..2a0f7c59afa3a 100644
--- a/drivers/gpu/drm/verisilicon/vs_hwdb.c
+++ b/drivers/gpu/drm/verisilicon/vs_hwdb.c
@@ -95,6 +95,7 @@ static struct vs_chip_identity vs_chip_identities[] = {
                .customer_id = ~0U,
.display_count = 2,
+               .max_cursor_size = 64,
                .formats = &vs_formats_no_yuv444,
        },
        {
@@ -103,6 +104,7 @@ static struct vs_chip_identity vs_chip_identities[] = {
                .customer_id = 0x30B,
.display_count = 2,
+               .max_cursor_size = 64,
                .formats = &vs_formats_no_yuv444,
        },
        {
@@ -111,6 +113,7 @@ static struct vs_chip_identity vs_chip_identities[] = {
                .customer_id = 0x310,
.display_count = 2,
+               .max_cursor_size = 64,
                .formats = &vs_formats_with_yuv444,
        },
        {
@@ -119,6 +122,7 @@ static struct vs_chip_identity vs_chip_identities[] = {
                .customer_id = 0x311,
.display_count = 2,
+               .max_cursor_size = 64,
                .formats = &vs_formats_no_yuv444,
        },
  };
diff --git a/drivers/gpu/drm/verisilicon/vs_hwdb.h 
b/drivers/gpu/drm/verisilicon/vs_hwdb.h
index 92192e4fa0862..c54c9326c1681 100644
--- a/drivers/gpu/drm/verisilicon/vs_hwdb.h
+++ b/drivers/gpu/drm/verisilicon/vs_hwdb.h
@@ -20,6 +20,7 @@ struct vs_chip_identity {
        u32 customer_id;
u32 display_count;
+       int32_t max_cursor_size;

Just 'unsigned int'.

BTW the other fields should have used regular C types unless they are required to have a certain size.

I would also store this as max_cursor_width and max_cursor_height. The term size somehow implies "raw size in bytes".

Best regards
Thomas

        const struct vs_formats *formats;
  };

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


Reply via email to