]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/gpu/drm/nouveau/core/include/subdev/bios/dcb.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / drivers / gpu / drm / nouveau / core / include / subdev / bios / dcb.h
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_ANY = -1,
15 };
16
17 struct dcb_output {
18         int index;      /* may not be raw dcb index if merging has happened */
19         enum dcb_output_type type;
20         uint8_t i2c_index;
21         uint8_t heads;
22         uint8_t connector;
23         uint8_t bus;
24         uint8_t location;
25         uint8_t or;
26         uint8_t link;
27         bool duallink_possible;
28         union {
29                 struct sor_conf {
30                         int link;
31                 } sorconf;
32                 struct {
33                         int maxfreq;
34                 } crtconf;
35                 struct {
36                         struct sor_conf sor;
37                         bool use_straps_for_mode;
38                         bool use_acpi_for_edid;
39                         bool use_power_scripts;
40                 } lvdsconf;
41                 struct {
42                         bool has_component_output;
43                 } tvconf;
44                 struct {
45                         struct sor_conf sor;
46                         int link_nr;
47                         int link_bw;
48                 } dpconf;
49                 struct {
50                         struct sor_conf sor;
51                         int slave_addr;
52                 } tmdsconf;
53         };
54         bool i2c_upper_default;
55 };
56
57 u16 dcb_table(struct nouveau_bios *, u8 *ver, u8 *hdr, u8 *ent, u8 *len);
58 u16 dcb_outp(struct nouveau_bios *, u8 idx, u8 *ver, u8 *len);
59 u16 dcb_outp_parse(struct nouveau_bios *, u8 idx, u8 *, u8 *,
60                    struct dcb_output *);
61 u16 dcb_outp_match(struct nouveau_bios *, u16 type, u16 mask, u8 *, u8 *,
62                    struct dcb_output *);
63 int dcb_outp_foreach(struct nouveau_bios *, void *data, int (*exec)
64                      (struct nouveau_bios *, void *, int index, u16 entry));
65
66 #endif