aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bios.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-07-10 20:44:20 -0400
committerBen Skeggs <bskeggs@redhat.com>2012-10-02 23:12:47 -0400
commitcb75d97e9c77743ecfcc43375be135a55a4d9b25 (patch)
treee7903f00db28b25a88d295dcc863f14b3d3bd707 /drivers/gpu/drm/nouveau/nouveau_bios.h
parent70790f4f819875e8f390871fd15bbbf823f28e1b (diff)
drm/nouveau: implement devinit subdev, and new init table parser
v2: - make sure not to execute display scripts unless resuming Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bios.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bios.h64
1 files changed, 8 insertions, 56 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.h b/drivers/gpu/drm/nouveau/nouveau_bios.h
index e9bb14ec8c3b..13a7e1270801 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.h
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.h
@@ -72,66 +72,18 @@ enum dcb_connector_type {
72 DCB_CONNECTOR_NONE = 0xff 72 DCB_CONNECTOR_NONE = 0xff
73}; 73};
74 74
75enum dcb_type { 75#include <subdev/bios/dcb.h>
76 OUTPUT_ANALOG = 0,
77 OUTPUT_TV = 1,
78 OUTPUT_TMDS = 2,
79 OUTPUT_LVDS = 3,
80 OUTPUT_DP = 6,
81 OUTPUT_EOL = 14, /* DCB 4.0+, appears to be end-of-list */
82 OUTPUT_UNUSED = 15,
83 OUTPUT_ANY = -1
84};
85
86struct dcb_entry {
87 int index; /* may not be raw dcb index if merging has happened */
88 enum dcb_type type;
89 uint8_t i2c_index;
90 uint8_t heads;
91 uint8_t connector;
92 uint8_t bus;
93 uint8_t location;
94 uint8_t or;
95 bool duallink_possible;
96 union {
97 struct sor_conf {
98 int link;
99 } sorconf;
100 struct {
101 int maxfreq;
102 } crtconf;
103 struct {
104 struct sor_conf sor;
105 bool use_straps_for_mode;
106 bool use_acpi_for_edid;
107 bool use_power_scripts;
108 } lvdsconf;
109 struct {
110 bool has_component_output;
111 } tvconf;
112 struct {
113 struct sor_conf sor;
114 int link_nr;
115 int link_bw;
116 } dpconf;
117 struct {
118 struct sor_conf sor;
119 int slave_addr;
120 } tmdsconf;
121 };
122 bool i2c_upper_default;
123};
124 76
125struct dcb_table { 77struct dcb_table {
126 uint8_t version; 78 uint8_t version;
127 int entries; 79 int entries;
128 struct dcb_entry entry[DCB_MAX_NUM_ENTRIES]; 80 struct dcb_output entry[DCB_MAX_NUM_ENTRIES];
129}; 81};
130 82
131enum nouveau_or { 83enum nouveau_or {
132 OUTPUT_A = (1 << 0), 84 DCB_OUTPUT_A = (1 << 0),
133 OUTPUT_B = (1 << 1), 85 DCB_OUTPUT_B = (1 << 1),
134 OUTPUT_C = (1 << 2) 86 DCB_OUTPUT_C = (1 << 2)
135}; 87};
136 88
137enum LVDS_script { 89enum LVDS_script {
@@ -195,7 +147,7 @@ struct nvbios {
195 } state; 147 } state;
196 148
197 struct { 149 struct {
198 struct dcb_entry *output; 150 struct dcb_output *output;
199 int crtc; 151 int crtc;
200 uint16_t script_table_ptr; 152 uint16_t script_table_ptr;
201 } display; 153 } display;
@@ -244,7 +196,7 @@ void *olddcb_table(struct drm_device *);
244void *olddcb_outp(struct drm_device *, u8 idx); 196void *olddcb_outp(struct drm_device *, u8 idx);
245int olddcb_outp_foreach(struct drm_device *, void *data, 197int olddcb_outp_foreach(struct drm_device *, void *data,
246 int (*)(struct drm_device *, void *, int idx, u8 *outp)); 198 int (*)(struct drm_device *, void *, int idx, u8 *outp));
247u8 *dcb_conntab(struct drm_device *); 199u8 *olddcb_conntab(struct drm_device *);
248u8 *dcb_conn(struct drm_device *, u8 idx); 200u8 *olddcb_conn(struct drm_device *, u8 idx);
249 201
250#endif 202#endif