]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
e0996aea BS |
2 | #ifndef __NVBIOS_DCB_H__ |
3 | #define __NVBIOS_DCB_H__ | |
e0996aea BS |
4 | enum dcb_output_type { |
5 | DCB_OUTPUT_ANALOG = 0x0, | |
6 | DCB_OUTPUT_TV = 0x1, | |
7 | DCB_OUTPUT_TMDS = 0x2, | |
8 | DCB_OUTPUT_LVDS = 0x3, | |
cb75d97e | 9 | DCB_OUTPUT_DP = 0x6, |
df00d5da | 10 | DCB_OUTPUT_WFD = 0x8, |
e0996aea BS |
11 | DCB_OUTPUT_EOL = 0xe, |
12 | DCB_OUTPUT_UNUSED = 0xf, | |
cb75d97e BS |
13 | DCB_OUTPUT_ANY = -1, |
14 | }; | |
15 | ||
16 | struct dcb_output { | |
17 | int index; /* may not be raw dcb index if merging has happened */ | |
8e992c8d BS |
18 | u16 hasht; |
19 | u16 hashm; | |
cb75d97e BS |
20 | enum dcb_output_type type; |
21 | uint8_t i2c_index; | |
22 | uint8_t heads; | |
23 | uint8_t connector; | |
24 | uint8_t bus; | |
25 | uint8_t location; | |
26 | uint8_t or; | |
75f8693f | 27 | uint8_t link; |
cb75d97e | 28 | bool duallink_possible; |
f3ed1048 | 29 | uint8_t extdev; |
cb75d97e BS |
30 | union { |
31 | struct sor_conf { | |
32 | int link; | |
33 | } sorconf; | |
34 | struct { | |
35 | int maxfreq; | |
36 | } crtconf; | |
37 | struct { | |
38 | struct sor_conf sor; | |
39 | bool use_straps_for_mode; | |
40 | bool use_acpi_for_edid; | |
41 | bool use_power_scripts; | |
42 | } lvdsconf; | |
43 | struct { | |
44 | bool has_component_output; | |
45 | } tvconf; | |
46 | struct { | |
47 | struct sor_conf sor; | |
48 | int link_nr; | |
49 | int link_bw; | |
50 | } dpconf; | |
51 | struct { | |
52 | struct sor_conf sor; | |
53 | int slave_addr; | |
54 | } tmdsconf; | |
55 | }; | |
56 | bool i2c_upper_default; | |
e0996aea BS |
57 | }; |
58 | ||
d390b480 BS |
59 | u16 dcb_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *ent, u8 *len); |
60 | u16 dcb_outp(struct nvkm_bios *, u8 idx, u8 *ver, u8 *len); | |
61 | u16 dcb_outp_parse(struct nvkm_bios *, u8 idx, u8 *, u8 *, | |
75f8693f | 62 | struct dcb_output *); |
d390b480 | 63 | u16 dcb_outp_match(struct nvkm_bios *, u16 type, u16 mask, u8 *, u8 *, |
75f8693f | 64 | struct dcb_output *); |
d390b480 BS |
65 | int dcb_outp_foreach(struct nvkm_bios *, void *data, int (*exec) |
66 | (struct nvkm_bios *, void *, int index, u16 entry)); | |
e0996aea | 67 | #endif |