0001
0002 #ifndef __NVBIOS_DCB_H__
0003 #define __NVBIOS_DCB_H__
0004 enum dcb_output_type {
0005 DCB_OUTPUT_ANALOG = 0x0,
0006 DCB_OUTPUT_TV = 0x1,
0007 DCB_OUTPUT_TMDS = 0x2,
0008 DCB_OUTPUT_LVDS = 0x3,
0009 DCB_OUTPUT_DP = 0x6,
0010 DCB_OUTPUT_WFD = 0x8,
0011 DCB_OUTPUT_EOL = 0xe,
0012 DCB_OUTPUT_UNUSED = 0xf,
0013 DCB_OUTPUT_ANY = -1,
0014 };
0015
0016 struct dcb_output {
0017 int index;
0018 u16 hasht;
0019 u16 hashm;
0020 enum dcb_output_type type;
0021 uint8_t i2c_index;
0022 uint8_t heads;
0023 uint8_t connector;
0024 uint8_t bus;
0025 uint8_t location;
0026 uint8_t or;
0027 uint8_t link;
0028 bool duallink_possible;
0029 uint8_t extdev;
0030 union {
0031 struct sor_conf {
0032 int link;
0033 } sorconf;
0034 struct {
0035 int maxfreq;
0036 } crtconf;
0037 struct {
0038 struct sor_conf sor;
0039 bool use_straps_for_mode;
0040 bool use_acpi_for_edid;
0041 bool use_power_scripts;
0042 } lvdsconf;
0043 struct {
0044 bool has_component_output;
0045 } tvconf;
0046 struct {
0047 struct sor_conf sor;
0048 int link_nr;
0049 int link_bw;
0050 } dpconf;
0051 struct {
0052 struct sor_conf sor;
0053 int slave_addr;
0054 } tmdsconf;
0055 };
0056 bool i2c_upper_default;
0057 int id;
0058 };
0059
0060 u16 dcb_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *ent, u8 *len);
0061 u16 dcb_outp(struct nvkm_bios *, u8 idx, u8 *ver, u8 *len);
0062 u16 dcb_outp_parse(struct nvkm_bios *, u8 idx, u8 *, u8 *,
0063 struct dcb_output *);
0064 u16 dcb_outp_match(struct nvkm_bios *, u16 type, u16 mask, u8 *, u8 *,
0065 struct dcb_output *);
0066 int dcb_outp_foreach(struct nvkm_bios *, void *data, int (*exec)
0067 (struct nvkm_bios *, void *, int index, u16 entry));
0068 #endif