xref: /linux/drivers/gpu/drm/verisilicon/vs_hwdb.h (revision 40288c9206c17eb66a603262e06a58d300d0f279)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2025 Icenowy Zheng <uwu@icenowy.me>
4  */
5 
6 #ifndef _VS_HWDB_H_
7 #define _VS_HWDB_H_
8 
9 #include <linux/regmap.h>
10 #include <linux/types.h>
11 
12 struct vs_formats {
13 	const u32 *primary_array;
14 	unsigned int primary_num;
15 };
16 
17 struct vs_chip_identity {
18 	u32 model;
19 	u32 revision;
20 	u32 customer_id;
21 
22 	u32 display_count;
23 	/*
24 	 * The hardware only supports square cursor planes, so this field
25 	 * is both the maximum width and height in pixels.
26 	 */
27 	int32_t max_cursor_size;
28 	const struct vs_formats *formats;
29 };
30 
31 int vs_fill_chip_identity(struct regmap *regs,
32 			  struct vs_chip_identity *ident);
33 
34 #endif /* _VS_HWDB_H_ */
35