diff options
Diffstat (limited to 'drivers/video/intelfb/intelfb.h')
-rw-r--r-- | drivers/video/intelfb/intelfb.h | 79 |
1 files changed, 78 insertions, 1 deletions
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h index e290d7460e1b..80b94c19a9fa 100644 --- a/drivers/video/intelfb/intelfb.h +++ b/drivers/video/intelfb/intelfb.h | |||
@@ -6,6 +6,10 @@ | |||
6 | #include <linux/agp_backend.h> | 6 | #include <linux/agp_backend.h> |
7 | #include <linux/fb.h> | 7 | #include <linux/fb.h> |
8 | 8 | ||
9 | #ifdef CONFIG_FB_INTEL_I2C | ||
10 | #include <linux/i2c.h> | ||
11 | #include <linux/i2c-algo-bit.h> | ||
12 | #endif | ||
9 | 13 | ||
10 | /*** Version/name ***/ | 14 | /*** Version/name ***/ |
11 | #define INTELFB_VERSION "0.9.4" | 15 | #define INTELFB_VERSION "0.9.4" |
@@ -115,6 +119,29 @@ | |||
115 | /* Intel agpgart driver */ | 119 | /* Intel agpgart driver */ |
116 | #define AGP_PHYSICAL_MEMORY 2 | 120 | #define AGP_PHYSICAL_MEMORY 2 |
117 | 121 | ||
122 | /* store information about an Ixxx DVO */ | ||
123 | /* The i830->i865 use multiple DVOs with multiple i2cs */ | ||
124 | /* the i915, i945 have a single sDVO i2c bus - which is different */ | ||
125 | #define MAX_OUTPUTS 6 | ||
126 | |||
127 | /* these are outputs from the chip - integrated only | ||
128 | external chips are via DVO or SDVO output */ | ||
129 | #define INTELFB_OUTPUT_UNUSED 0 | ||
130 | #define INTELFB_OUTPUT_ANALOG 1 | ||
131 | #define INTELFB_OUTPUT_DVO 2 | ||
132 | #define INTELFB_OUTPUT_SDVO 3 | ||
133 | #define INTELFB_OUTPUT_LVDS 4 | ||
134 | #define INTELFB_OUTPUT_TVOUT 5 | ||
135 | |||
136 | #define INTELFB_DVO_CHIP_NONE 0 | ||
137 | #define INTELFB_DVO_CHIP_LVDS 1 | ||
138 | #define INTELFB_DVO_CHIP_TMDS 2 | ||
139 | #define INTELFB_DVO_CHIP_TVOUT 4 | ||
140 | |||
141 | #define INTELFB_OUTPUT_PIPE_NC 0 | ||
142 | #define INTELFB_OUTPUT_PIPE_A 1 | ||
143 | #define INTELFB_OUTPUT_PIPE_B 2 | ||
144 | |||
118 | /*** Data Types ***/ | 145 | /*** Data Types ***/ |
119 | 146 | ||
120 | /* supported chipsets */ | 147 | /* supported chipsets */ |
@@ -195,6 +222,10 @@ struct intelfb_hwstate { | |||
195 | u32 mem_mode; | 222 | u32 mem_mode; |
196 | u32 fw_blc_0; | 223 | u32 fw_blc_0; |
197 | u32 fw_blc_1; | 224 | u32 fw_blc_1; |
225 | u16 hwstam; | ||
226 | u16 ier; | ||
227 | u16 iir; | ||
228 | u16 imr; | ||
198 | }; | 229 | }; |
199 | 230 | ||
200 | struct intelfb_heap_data { | 231 | struct intelfb_heap_data { |
@@ -204,6 +235,33 @@ struct intelfb_heap_data { | |||
204 | u32 size; // in bytes | 235 | u32 size; // in bytes |
205 | }; | 236 | }; |
206 | 237 | ||
238 | #ifdef CONFIG_FB_INTEL_I2C | ||
239 | struct intelfb_i2c_chan { | ||
240 | struct intelfb_info *dinfo; | ||
241 | u32 reg; | ||
242 | struct i2c_adapter adapter; | ||
243 | struct i2c_algo_bit_data algo; | ||
244 | }; | ||
245 | #endif | ||
246 | |||
247 | struct intelfb_output_rec { | ||
248 | int type; | ||
249 | int pipe; | ||
250 | int flags; | ||
251 | |||
252 | #ifdef CONFIG_FB_INTEL_I2C | ||
253 | struct intelfb_i2c_chan i2c_bus; | ||
254 | struct intelfb_i2c_chan ddc_bus; | ||
255 | #endif | ||
256 | }; | ||
257 | |||
258 | struct intelfb_vsync { | ||
259 | wait_queue_head_t wait; | ||
260 | unsigned int count; | ||
261 | int pan_display; | ||
262 | u32 pan_offset; | ||
263 | }; | ||
264 | |||
207 | struct intelfb_info { | 265 | struct intelfb_info { |
208 | struct fb_info *info; | 266 | struct fb_info *info; |
209 | struct fb_ops *fbops; | 267 | struct fb_ops *fbops; |
@@ -220,7 +278,7 @@ struct intelfb_info { | |||
220 | u8 fbmem_gart; | 278 | u8 fbmem_gart; |
221 | 279 | ||
222 | /* mtrr support */ | 280 | /* mtrr support */ |
223 | u32 mtrr_reg; | 281 | int mtrr_reg; |
224 | u32 has_mtrr; | 282 | u32 has_mtrr; |
225 | 283 | ||
226 | /* heap data */ | 284 | /* heap data */ |
@@ -267,6 +325,12 @@ struct intelfb_info { | |||
267 | int fixed_mode; | 325 | int fixed_mode; |
268 | int ring_active; | 326 | int ring_active; |
269 | int flag; | 327 | int flag; |
328 | unsigned long irq_flags; | ||
329 | int open; | ||
330 | |||
331 | /* vsync */ | ||
332 | struct intelfb_vsync vsync; | ||
333 | spinlock_t int_lock; | ||
270 | 334 | ||
271 | /* hw cursor */ | 335 | /* hw cursor */ |
272 | int cursor_on; | 336 | int cursor_on; |
@@ -285,12 +349,25 @@ struct intelfb_info { | |||
285 | 349 | ||
286 | /* index into plls */ | 350 | /* index into plls */ |
287 | int pll_index; | 351 | int pll_index; |
352 | |||
353 | /* outputs */ | ||
354 | int num_outputs; | ||
355 | struct intelfb_output_rec output[MAX_OUTPUTS]; | ||
288 | }; | 356 | }; |
289 | 357 | ||
290 | #define IS_I9XX(dinfo) (((dinfo)->chipset == INTEL_915G)||(dinfo->chipset == INTEL_915GM)||((dinfo)->chipset == INTEL_945G)||(dinfo->chipset==INTEL_945GM)) | 358 | #define IS_I9XX(dinfo) (((dinfo)->chipset == INTEL_915G)||(dinfo->chipset == INTEL_915GM)||((dinfo)->chipset == INTEL_945G)||(dinfo->chipset==INTEL_945GM)) |
291 | 359 | ||
360 | #ifndef FBIO_WAITFORVSYNC | ||
361 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) | ||
362 | #endif | ||
363 | |||
292 | /*** function prototypes ***/ | 364 | /*** function prototypes ***/ |
293 | 365 | ||
294 | extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var); | 366 | extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var); |
295 | 367 | ||
368 | #ifdef CONFIG_FB_INTEL_I2C | ||
369 | extern void intelfb_create_i2c_busses(struct intelfb_info *dinfo); | ||
370 | extern void intelfb_delete_i2c_busses(struct intelfb_info *dinfo); | ||
371 | #endif | ||
372 | |||
296 | #endif /* _INTELFB_H */ | 373 | #endif /* _INTELFB_H */ |