summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/verisilicon/vs_hwdb.h
blob: 2065ecb73043797b09a9aea176d498c73f8ed61e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2025 Icenowy Zheng <uwu@icenowy.me>
 */

#ifndef _VS_HWDB_H_
#define _VS_HWDB_H_

#include <linux/regmap.h>
#include <linux/types.h>

struct vs_formats {
	const u32 *array;
	unsigned int num;
};

struct vs_chip_identity {
	u32 model;
	u32 revision;
	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;
};

int vs_fill_chip_identity(struct regmap *regs,
			  struct vs_chip_identity *ident);

#endif /* _VS_HWDB_H_ */