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