xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/subdev/bios/vpstate.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1 /*	$NetBSD: vpstate.h,v 1.2 2021/12/18 23:45:33 riastradh Exp $	*/
2 
3 /* SPDX-License-Identifier: MIT */
4 #ifndef __NVBIOS_VPSTATE_H__
5 #define __NVBIOS_VPSTATE_H__
6 struct nvbios_vpstate_header {
7 	u32 offset;
8 
9 	u8 version;
10 	u8 hlen;
11 	u8 ecount;
12 	u8 elen;
13 	u8 scount;
14 	u8 slen;
15 
16 	u8 base_id;
17 	u8 boost_id;
18 	u8 tdp_id;
19 };
20 struct nvbios_vpstate_entry {
21 	u8  pstate;
22 	u16 clock_mhz;
23 };
24 int nvbios_vpstate_parse(struct nvkm_bios *, struct nvbios_vpstate_header *);
25 int nvbios_vpstate_entry(struct nvkm_bios *, struct nvbios_vpstate_header *,
26 			 u8 idx, struct nvbios_vpstate_entry *);
27 #endif
28