]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm: verisilicon: add max cursor size to HWDB
authorIcenowy Zheng <zhengxingda@iscas.ac.cn>
Wed, 6 May 2026 17:56:09 +0000 (01:56 +0800)
committerIcenowy Zheng <zhengxingda@iscas.ac.cn>
Fri, 22 May 2026 11:19:21 +0000 (19:19 +0800)
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 <zhengxingda@iscas.ac.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260506175610.2542888-2-zhengxingda@iscas.ac.cn
drivers/gpu/drm/verisilicon/vs_hwdb.c
drivers/gpu/drm/verisilicon/vs_hwdb.h

index 09336af0900ae3855bfc3448cac1a2c5d5f9fa38..2a0f7c59afa3a56e89b6e0f26414599503fcf39f 100644 (file)
@@ -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,
        },
 };
index 92192e4fa08625785af6b899059311e9cb222ad0..2065ecb73043797b09a9aea176d498c73f8ed61e 100644 (file)
@@ -20,6 +20,11 @@ struct vs_chip_identity {
        u32 customer_id;
 
        u32 display_count;
+       /*
+        * The hardware only supports square cursor planes, so this field
+        * is both the maximum width and height in pixels.
+        */
+       int32_t max_cursor_size;
        const struct vs_formats *formats;
 };