diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-09 18:51:32 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-09 18:51:32 -0400 |
| commit | 5f097cd249f00683442c3e265d6f27d80fc83563 (patch) | |
| tree | 6b354913fcb2a099aa26e017895e1e6fdf6385e2 /include | |
| parent | a82a729f04232ccd0b59406574ba4cf20027a49d (diff) | |
| parent | 1b6c79361ba5ce30b40f0f7d6fc2421dc5fcbe0c (diff) | |
Merge tag 'fbdev-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev
Pull fbdev update from Jean-Christophe PLAGNIOL-VILLARD:
"Various fbdev changes for 3.11
- xilinxfb updates
- Small cleanups and fixes to multiple drivers
- OMAP display subsystem bug updates
- imxfb dt support"
* tag 'fbdev-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev: (95 commits)
video: imxfb: Add DT support
video: i740fb: Make i740fb_init static
fb: make fp_get_options name argument const
video: mmp: fix graphics/video layer enable/mask swap issue
video: mmp: fix memcpy wrong size for mmp_addr issue
radeon: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
aty128fb: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
video: of_display_timing.h: Declare 'display_timing'
fbdev: bfin-lq035q1-fb: Use dev_pm_ops
fbmem: return -EFAULT on copy_to_user() failure
OMAPDSS: DPI: Fix wrong pixel clock limit
video: replace strict_strtoul() with kstrtoul()
uvesafb: Correct/simplify warning message
fb: fix atyfb unused data warnings
fb: fix atyfb build warning
video: imxfb: Make local symbols static
video: udlfb: Make local symbol static
video: udlfb: Use NULL instead of 0
video: smscufx: Use NULL instead of 0
video: remove unnecessary platform_set_drvdata()
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/fb.h | 2 | ||||
| -rw-r--r-- | include/video/of_display_timing.h | 3 | ||||
| -rw-r--r-- | include/video/omap-panel-data.h | 209 | ||||
| -rw-r--r-- | include/video/omapdss.h | 293 |
4 files changed, 464 insertions, 43 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index d49c60f5aa4c..ffac70aab3e9 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -624,7 +624,7 @@ extern void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u3 | |||
| 624 | extern void fb_set_suspend(struct fb_info *info, int state); | 624 | extern void fb_set_suspend(struct fb_info *info, int state); |
| 625 | extern int fb_get_color_depth(struct fb_var_screeninfo *var, | 625 | extern int fb_get_color_depth(struct fb_var_screeninfo *var, |
| 626 | struct fb_fix_screeninfo *fix); | 626 | struct fb_fix_screeninfo *fix); |
| 627 | extern int fb_get_options(char *name, char **option); | 627 | extern int fb_get_options(const char *name, char **option); |
| 628 | extern int fb_new_modelist(struct fb_info *info); | 628 | extern int fb_new_modelist(struct fb_info *info); |
| 629 | 629 | ||
| 630 | extern struct fb_info *registered_fb[FB_MAX]; | 630 | extern struct fb_info *registered_fb[FB_MAX]; |
diff --git a/include/video/of_display_timing.h b/include/video/of_display_timing.h index 8016eb727cf3..79e6697af6cf 100644 --- a/include/video/of_display_timing.h +++ b/include/video/of_display_timing.h | |||
| @@ -10,10 +10,13 @@ | |||
| 10 | #define __LINUX_OF_DISPLAY_TIMING_H | 10 | #define __LINUX_OF_DISPLAY_TIMING_H |
| 11 | 11 | ||
| 12 | struct device_node; | 12 | struct device_node; |
| 13 | struct display_timing; | ||
| 13 | struct display_timings; | 14 | struct display_timings; |
| 14 | 15 | ||
| 15 | #define OF_USE_NATIVE_MODE -1 | 16 | #define OF_USE_NATIVE_MODE -1 |
| 16 | 17 | ||
| 18 | int of_get_display_timing(struct device_node *np, const char *name, | ||
| 19 | struct display_timing *dt); | ||
| 17 | struct display_timings *of_get_display_timings(struct device_node *np); | 20 | struct display_timings *of_get_display_timings(struct device_node *np); |
| 18 | int of_display_timings_exist(struct device_node *np); | 21 | int of_display_timings_exist(struct device_node *np); |
| 19 | 22 | ||
diff --git a/include/video/omap-panel-data.h b/include/video/omap-panel-data.h index 0c3b46d3daf3..6b2366fb6e53 100644 --- a/include/video/omap-panel-data.h +++ b/include/video/omap-panel-data.h | |||
| @@ -27,6 +27,9 @@ | |||
| 27 | #ifndef __OMAP_PANEL_DATA_H | 27 | #ifndef __OMAP_PANEL_DATA_H |
| 28 | #define __OMAP_PANEL_DATA_H | 28 | #define __OMAP_PANEL_DATA_H |
| 29 | 29 | ||
| 30 | #include <video/omapdss.h> | ||
| 31 | #include <video/display_timing.h> | ||
| 32 | |||
| 30 | struct omap_dss_device; | 33 | struct omap_dss_device; |
| 31 | 34 | ||
| 32 | /** | 35 | /** |
| @@ -147,4 +150,210 @@ struct panel_tpo_td043_data { | |||
| 147 | int nreset_gpio; | 150 | int nreset_gpio; |
| 148 | }; | 151 | }; |
| 149 | 152 | ||
| 153 | /** | ||
| 154 | * encoder_tfp410 platform data | ||
| 155 | * @name: name for this display entity | ||
| 156 | * @power_down_gpio: gpio number for PD pin (or -1 if not available) | ||
| 157 | * @data_lines: number of DPI datalines | ||
| 158 | */ | ||
| 159 | struct encoder_tfp410_platform_data { | ||
| 160 | const char *name; | ||
| 161 | const char *source; | ||
| 162 | int power_down_gpio; | ||
| 163 | int data_lines; | ||
| 164 | }; | ||
| 165 | |||
| 166 | /** | ||
| 167 | * encoder_tpd12s015 platform data | ||
| 168 | * @name: name for this display entity | ||
| 169 | * @ct_cp_hpd_gpio: CT_CP_HPD gpio number | ||
| 170 | * @ls_oe_gpio: LS_OE gpio number | ||
| 171 | * @hpd_gpio: HPD gpio number | ||
| 172 | */ | ||
| 173 | struct encoder_tpd12s015_platform_data { | ||
| 174 | const char *name; | ||
| 175 | const char *source; | ||
| 176 | |||
| 177 | int ct_cp_hpd_gpio; | ||
| 178 | int ls_oe_gpio; | ||
| 179 | int hpd_gpio; | ||
| 180 | }; | ||
| 181 | |||
| 182 | /** | ||
| 183 | * connector_dvi platform data | ||
| 184 | * @name: name for this display entity | ||
| 185 | * @source: name of the display entity used as a video source | ||
| 186 | * @i2c_bus_num: i2c bus number to be used for reading EDID | ||
| 187 | */ | ||
| 188 | struct connector_dvi_platform_data { | ||
| 189 | const char *name; | ||
| 190 | const char *source; | ||
| 191 | int i2c_bus_num; | ||
| 192 | }; | ||
| 193 | |||
| 194 | /** | ||
| 195 | * connector_hdmi platform data | ||
| 196 | * @name: name for this display entity | ||
| 197 | * @source: name of the display entity used as a video source | ||
| 198 | */ | ||
| 199 | struct connector_hdmi_platform_data { | ||
| 200 | const char *name; | ||
| 201 | const char *source; | ||
| 202 | }; | ||
| 203 | |||
| 204 | /** | ||
| 205 | * connector_atv platform data | ||
| 206 | * @name: name for this display entity | ||
| 207 | * @source: name of the display entity used as a video source | ||
| 208 | * @connector_type: composite/svideo | ||
| 209 | * @invert_polarity: invert signal polarity | ||
| 210 | */ | ||
| 211 | struct connector_atv_platform_data { | ||
| 212 | const char *name; | ||
| 213 | const char *source; | ||
| 214 | |||
| 215 | enum omap_dss_venc_type connector_type; | ||
| 216 | bool invert_polarity; | ||
| 217 | }; | ||
| 218 | |||
| 219 | /** | ||
| 220 | * panel_dpi platform data | ||
| 221 | * @name: name for this display entity | ||
| 222 | * @source: name of the display entity used as a video source | ||
| 223 | * @data_lines: number of DPI datalines | ||
| 224 | * @display_timing: timings for this panel | ||
| 225 | * @backlight_gpio: gpio to enable/disable the backlight (or -1) | ||
| 226 | * @enable_gpio: gpio to enable/disable the panel (or -1) | ||
| 227 | */ | ||
| 228 | struct panel_dpi_platform_data { | ||
| 229 | const char *name; | ||
| 230 | const char *source; | ||
| 231 | |||
| 232 | int data_lines; | ||
| 233 | |||
| 234 | const struct display_timing *display_timing; | ||
| 235 | |||
| 236 | int backlight_gpio; | ||
| 237 | int enable_gpio; | ||
| 238 | }; | ||
| 239 | |||
| 240 | /** | ||
| 241 | * panel_dsicm platform data | ||
| 242 | * @name: name for this display entity | ||
| 243 | * @source: name of the display entity used as a video source | ||
| 244 | * @reset_gpio: gpio to reset the panel (or -1) | ||
| 245 | * @use_ext_te: use external TE GPIO | ||
| 246 | * @ext_te_gpio: external TE GPIO | ||
| 247 | * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) | ||
| 248 | * @use_dsi_backlight: true if panel uses DSI command to control backlight | ||
| 249 | * @pin_config: DSI pin configuration | ||
| 250 | */ | ||
| 251 | struct panel_dsicm_platform_data { | ||
| 252 | const char *name; | ||
| 253 | const char *source; | ||
| 254 | |||
| 255 | int reset_gpio; | ||
| 256 | |||
| 257 | bool use_ext_te; | ||
| 258 | int ext_te_gpio; | ||
| 259 | |||
| 260 | unsigned ulps_timeout; | ||
| 261 | |||
| 262 | bool use_dsi_backlight; | ||
| 263 | |||
| 264 | struct omap_dsi_pin_config pin_config; | ||
| 265 | }; | ||
| 266 | |||
| 267 | /** | ||
| 268 | * panel_acx565akm platform data | ||
| 269 | * @name: name for this display entity | ||
| 270 | * @source: name of the display entity used as a video source | ||
| 271 | * @reset_gpio: gpio to reset the panel (or -1) | ||
| 272 | * @datapairs: number of SDI datapairs | ||
| 273 | */ | ||
| 274 | struct panel_acx565akm_platform_data { | ||
| 275 | const char *name; | ||
| 276 | const char *source; | ||
| 277 | |||
| 278 | int reset_gpio; | ||
| 279 | |||
| 280 | int datapairs; | ||
| 281 | }; | ||
| 282 | |||
| 283 | /** | ||
| 284 | * panel_lb035q02 platform data | ||
| 285 | * @name: name for this display entity | ||
| 286 | * @source: name of the display entity used as a video source | ||
| 287 | * @data_lines: number of DPI datalines | ||
| 288 | * @backlight_gpio: gpio to enable/disable the backlight (or -1) | ||
| 289 | * @enable_gpio: gpio to enable/disable the panel (or -1) | ||
| 290 | */ | ||
| 291 | struct panel_lb035q02_platform_data { | ||
| 292 | const char *name; | ||
| 293 | const char *source; | ||
| 294 | |||
| 295 | int data_lines; | ||
| 296 | |||
| 297 | int backlight_gpio; | ||
| 298 | int enable_gpio; | ||
| 299 | }; | ||
| 300 | |||
| 301 | /** | ||
| 302 | * panel_sharp_ls037v7dw01 platform data | ||
| 303 | * @name: name for this display entity | ||
| 304 | * @source: name of the display entity used as a video source | ||
| 305 | * @data_lines: number of DPI datalines | ||
| 306 | * @resb_gpio: reset signal GPIO | ||
| 307 | * @ini_gpio: power on control GPIO | ||
| 308 | * @mo_gpio: selection for resolution(VGA/QVGA) GPIO | ||
| 309 | * @lr_gpio: selection for horizontal scanning direction GPIO | ||
| 310 | * @ud_gpio: selection for vertical scanning direction GPIO | ||
| 311 | */ | ||
| 312 | struct panel_sharp_ls037v7dw01_platform_data { | ||
| 313 | const char *name; | ||
| 314 | const char *source; | ||
| 315 | |||
| 316 | int data_lines; | ||
| 317 | |||
| 318 | int resb_gpio; | ||
| 319 | int ini_gpio; | ||
| 320 | int mo_gpio; | ||
| 321 | int lr_gpio; | ||
| 322 | int ud_gpio; | ||
| 323 | }; | ||
| 324 | |||
| 325 | /** | ||
| 326 | * panel-tpo-td043mtea1 platform data | ||
| 327 | * @name: name for this display entity | ||
| 328 | * @source: name of the display entity used as a video source | ||
| 329 | * @data_lines: number of DPI datalines | ||
| 330 | * @nreset_gpio: reset signal | ||
| 331 | */ | ||
| 332 | struct panel_tpo_td043mtea1_platform_data { | ||
| 333 | const char *name; | ||
| 334 | const char *source; | ||
| 335 | |||
| 336 | int data_lines; | ||
| 337 | |||
| 338 | int nreset_gpio; | ||
| 339 | }; | ||
| 340 | |||
| 341 | /** | ||
| 342 | * panel-nec-nl8048hl11 platform data | ||
| 343 | * @name: name for this display entity | ||
| 344 | * @source: name of the display entity used as a video source | ||
| 345 | * @data_lines: number of DPI datalines | ||
| 346 | * @res_gpio: reset signal | ||
| 347 | * @qvga_gpio: selection for resolution(QVGA/WVGA) | ||
| 348 | */ | ||
| 349 | struct panel_nec_nl8048hl11_platform_data { | ||
| 350 | const char *name; | ||
| 351 | const char *source; | ||
| 352 | |||
| 353 | int data_lines; | ||
| 354 | |||
| 355 | int res_gpio; | ||
| 356 | int qvga_gpio; | ||
| 357 | }; | ||
| 358 | |||
| 150 | #endif /* __OMAP_PANEL_DATA_H */ | 359 | #endif /* __OMAP_PANEL_DATA_H */ |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index aeb4e9a0c5d1..b39463553845 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
| 24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
| 25 | 25 | ||
| 26 | #include <video/videomode.h> | ||
| 27 | |||
| 26 | #define DISPC_IRQ_FRAMEDONE (1 << 0) | 28 | #define DISPC_IRQ_FRAMEDONE (1 << 0) |
| 27 | #define DISPC_IRQ_VSYNC (1 << 1) | 29 | #define DISPC_IRQ_VSYNC (1 << 1) |
| 28 | #define DISPC_IRQ_EVSYNC_EVEN (1 << 2) | 30 | #define DISPC_IRQ_EVSYNC_EVEN (1 << 2) |
| @@ -68,6 +70,7 @@ enum omap_display_type { | |||
| 68 | OMAP_DISPLAY_TYPE_DSI = 1 << 3, | 70 | OMAP_DISPLAY_TYPE_DSI = 1 << 3, |
| 69 | OMAP_DISPLAY_TYPE_VENC = 1 << 4, | 71 | OMAP_DISPLAY_TYPE_VENC = 1 << 4, |
| 70 | OMAP_DISPLAY_TYPE_HDMI = 1 << 5, | 72 | OMAP_DISPLAY_TYPE_HDMI = 1 << 5, |
| 73 | OMAP_DISPLAY_TYPE_DVI = 1 << 6, | ||
| 71 | }; | 74 | }; |
| 72 | 75 | ||
| 73 | enum omap_plane { | 76 | enum omap_plane { |
| @@ -169,6 +172,11 @@ enum omap_dss_audio_state { | |||
| 169 | OMAP_DSS_AUDIO_PLAYING, | 172 | OMAP_DSS_AUDIO_PLAYING, |
| 170 | }; | 173 | }; |
| 171 | 174 | ||
| 175 | struct omap_dss_audio { | ||
| 176 | struct snd_aes_iec958 *iec; | ||
| 177 | struct snd_cea_861_aud_if *cea; | ||
| 178 | }; | ||
| 179 | |||
| 172 | enum omap_dss_rotation_type { | 180 | enum omap_dss_rotation_type { |
| 173 | OMAP_DSS_ROT_DMA = 1 << 0, | 181 | OMAP_DSS_ROT_DMA = 1 << 0, |
| 174 | OMAP_DSS_ROT_VRFB = 1 << 1, | 182 | OMAP_DSS_ROT_VRFB = 1 << 1, |
| @@ -365,6 +373,7 @@ struct omap_dss_board_info { | |||
| 365 | int num_devices; | 373 | int num_devices; |
| 366 | struct omap_dss_device **devices; | 374 | struct omap_dss_device **devices; |
| 367 | struct omap_dss_device *default_device; | 375 | struct omap_dss_device *default_device; |
| 376 | const char *default_display_name; | ||
| 368 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); | 377 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); |
| 369 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); | 378 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); |
| 370 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); | 379 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); |
| @@ -512,7 +521,7 @@ struct omap_overlay_manager { | |||
| 512 | enum omap_dss_output_id supported_outputs; | 521 | enum omap_dss_output_id supported_outputs; |
| 513 | 522 | ||
| 514 | /* dynamic fields */ | 523 | /* dynamic fields */ |
| 515 | struct omap_dss_output *output; | 524 | struct omap_dss_device *output; |
| 516 | 525 | ||
| 517 | /* | 526 | /* |
| 518 | * The following functions do not block: | 527 | * The following functions do not block: |
| @@ -526,7 +535,7 @@ struct omap_overlay_manager { | |||
| 526 | */ | 535 | */ |
| 527 | 536 | ||
| 528 | int (*set_output)(struct omap_overlay_manager *mgr, | 537 | int (*set_output)(struct omap_overlay_manager *mgr, |
| 529 | struct omap_dss_output *output); | 538 | struct omap_dss_device *output); |
| 530 | int (*unset_output)(struct omap_overlay_manager *mgr); | 539 | int (*unset_output)(struct omap_overlay_manager *mgr); |
| 531 | 540 | ||
| 532 | int (*set_manager_info)(struct omap_overlay_manager *mgr, | 541 | int (*set_manager_info)(struct omap_overlay_manager *mgr, |
| @@ -569,33 +578,192 @@ struct omap_dss_writeback_info { | |||
| 569 | u8 pre_mult_alpha; | 578 | u8 pre_mult_alpha; |
| 570 | }; | 579 | }; |
| 571 | 580 | ||
| 572 | struct omap_dss_output { | 581 | struct omapdss_dpi_ops { |
| 573 | struct list_head list; | 582 | int (*connect)(struct omap_dss_device *dssdev, |
| 583 | struct omap_dss_device *dst); | ||
| 584 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 585 | struct omap_dss_device *dst); | ||
| 574 | 586 | ||
| 575 | const char *name; | 587 | int (*enable)(struct omap_dss_device *dssdev); |
| 588 | void (*disable)(struct omap_dss_device *dssdev); | ||
| 576 | 589 | ||
| 577 | /* display type supported by the output */ | 590 | int (*check_timings)(struct omap_dss_device *dssdev, |
| 578 | enum omap_display_type type; | 591 | struct omap_video_timings *timings); |
| 592 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 593 | struct omap_video_timings *timings); | ||
| 594 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 595 | struct omap_video_timings *timings); | ||
| 579 | 596 | ||
| 580 | /* DISPC channel for this output */ | 597 | void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines); |
| 581 | enum omap_channel dispc_channel; | 598 | }; |
| 582 | 599 | ||
| 583 | /* output instance */ | 600 | struct omapdss_sdi_ops { |
| 584 | enum omap_dss_output_id id; | 601 | int (*connect)(struct omap_dss_device *dssdev, |
| 602 | struct omap_dss_device *dst); | ||
| 603 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 604 | struct omap_dss_device *dst); | ||
| 585 | 605 | ||
| 586 | /* output's platform device pointer */ | 606 | int (*enable)(struct omap_dss_device *dssdev); |
| 587 | struct platform_device *pdev; | 607 | void (*disable)(struct omap_dss_device *dssdev); |
| 588 | 608 | ||
| 589 | /* dynamic fields */ | 609 | int (*check_timings)(struct omap_dss_device *dssdev, |
| 590 | struct omap_overlay_manager *manager; | 610 | struct omap_video_timings *timings); |
| 611 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 612 | struct omap_video_timings *timings); | ||
| 613 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 614 | struct omap_video_timings *timings); | ||
| 591 | 615 | ||
| 592 | struct omap_dss_device *device; | 616 | void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs); |
| 617 | }; | ||
| 618 | |||
| 619 | struct omapdss_dvi_ops { | ||
| 620 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 621 | struct omap_dss_device *dst); | ||
| 622 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 623 | struct omap_dss_device *dst); | ||
| 624 | |||
| 625 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 626 | void (*disable)(struct omap_dss_device *dssdev); | ||
| 627 | |||
| 628 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
| 629 | struct omap_video_timings *timings); | ||
| 630 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 631 | struct omap_video_timings *timings); | ||
| 632 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 633 | struct omap_video_timings *timings); | ||
| 634 | }; | ||
| 635 | |||
| 636 | struct omapdss_atv_ops { | ||
| 637 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 638 | struct omap_dss_device *dst); | ||
| 639 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 640 | struct omap_dss_device *dst); | ||
| 641 | |||
| 642 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 643 | void (*disable)(struct omap_dss_device *dssdev); | ||
| 644 | |||
| 645 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
| 646 | struct omap_video_timings *timings); | ||
| 647 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 648 | struct omap_video_timings *timings); | ||
| 649 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 650 | struct omap_video_timings *timings); | ||
| 651 | |||
| 652 | void (*set_type)(struct omap_dss_device *dssdev, | ||
| 653 | enum omap_dss_venc_type type); | ||
| 654 | void (*invert_vid_out_polarity)(struct omap_dss_device *dssdev, | ||
| 655 | bool invert_polarity); | ||
| 656 | |||
| 657 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); | ||
| 658 | u32 (*get_wss)(struct omap_dss_device *dssdev); | ||
| 659 | }; | ||
| 660 | |||
| 661 | struct omapdss_hdmi_ops { | ||
| 662 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 663 | struct omap_dss_device *dst); | ||
| 664 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 665 | struct omap_dss_device *dst); | ||
| 666 | |||
| 667 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 668 | void (*disable)(struct omap_dss_device *dssdev); | ||
| 669 | |||
| 670 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
| 671 | struct omap_video_timings *timings); | ||
| 672 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
| 673 | struct omap_video_timings *timings); | ||
| 674 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
| 675 | struct omap_video_timings *timings); | ||
| 676 | |||
| 677 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | ||
| 678 | bool (*detect)(struct omap_dss_device *dssdev); | ||
| 679 | |||
| 680 | /* | ||
| 681 | * Note: These functions might sleep. Do not call while | ||
| 682 | * holding a spinlock/readlock. | ||
| 683 | */ | ||
| 684 | int (*audio_enable)(struct omap_dss_device *dssdev); | ||
| 685 | void (*audio_disable)(struct omap_dss_device *dssdev); | ||
| 686 | bool (*audio_supported)(struct omap_dss_device *dssdev); | ||
| 687 | int (*audio_config)(struct omap_dss_device *dssdev, | ||
| 688 | struct omap_dss_audio *audio); | ||
| 689 | /* Note: These functions may not sleep */ | ||
| 690 | int (*audio_start)(struct omap_dss_device *dssdev); | ||
| 691 | void (*audio_stop)(struct omap_dss_device *dssdev); | ||
| 692 | }; | ||
| 693 | |||
| 694 | struct omapdss_dsi_ops { | ||
| 695 | int (*connect)(struct omap_dss_device *dssdev, | ||
| 696 | struct omap_dss_device *dst); | ||
| 697 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
| 698 | struct omap_dss_device *dst); | ||
| 699 | |||
| 700 | int (*enable)(struct omap_dss_device *dssdev); | ||
| 701 | void (*disable)(struct omap_dss_device *dssdev, bool disconnect_lanes, | ||
| 702 | bool enter_ulps); | ||
| 703 | |||
| 704 | /* bus configuration */ | ||
| 705 | int (*set_config)(struct omap_dss_device *dssdev, | ||
| 706 | const struct omap_dss_dsi_config *cfg); | ||
| 707 | int (*configure_pins)(struct omap_dss_device *dssdev, | ||
| 708 | const struct omap_dsi_pin_config *pin_cfg); | ||
| 709 | |||
| 710 | void (*enable_hs)(struct omap_dss_device *dssdev, int channel, | ||
| 711 | bool enable); | ||
| 712 | int (*enable_te)(struct omap_dss_device *dssdev, bool enable); | ||
| 713 | |||
| 714 | int (*update)(struct omap_dss_device *dssdev, int channel, | ||
| 715 | void (*callback)(int, void *), void *data); | ||
| 716 | |||
| 717 | void (*bus_lock)(struct omap_dss_device *dssdev); | ||
| 718 | void (*bus_unlock)(struct omap_dss_device *dssdev); | ||
| 719 | |||
| 720 | int (*enable_video_output)(struct omap_dss_device *dssdev, int channel); | ||
| 721 | void (*disable_video_output)(struct omap_dss_device *dssdev, | ||
| 722 | int channel); | ||
| 723 | |||
| 724 | int (*request_vc)(struct omap_dss_device *dssdev, int *channel); | ||
| 725 | int (*set_vc_id)(struct omap_dss_device *dssdev, int channel, | ||
| 726 | int vc_id); | ||
| 727 | void (*release_vc)(struct omap_dss_device *dssdev, int channel); | ||
| 728 | |||
| 729 | /* data transfer */ | ||
| 730 | int (*dcs_write)(struct omap_dss_device *dssdev, int channel, | ||
| 731 | u8 *data, int len); | ||
| 732 | int (*dcs_write_nosync)(struct omap_dss_device *dssdev, int channel, | ||
| 733 | u8 *data, int len); | ||
| 734 | int (*dcs_read)(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, | ||
| 735 | u8 *data, int len); | ||
| 736 | |||
| 737 | int (*gen_write)(struct omap_dss_device *dssdev, int channel, | ||
| 738 | u8 *data, int len); | ||
| 739 | int (*gen_write_nosync)(struct omap_dss_device *dssdev, int channel, | ||
| 740 | u8 *data, int len); | ||
| 741 | int (*gen_read)(struct omap_dss_device *dssdev, int channel, | ||
| 742 | u8 *reqdata, int reqlen, | ||
| 743 | u8 *data, int len); | ||
| 744 | |||
| 745 | int (*bta_sync)(struct omap_dss_device *dssdev, int channel); | ||
| 746 | |||
| 747 | int (*set_max_rx_packet_size)(struct omap_dss_device *dssdev, | ||
| 748 | int channel, u16 plen); | ||
| 593 | }; | 749 | }; |
| 594 | 750 | ||
| 595 | struct omap_dss_device { | 751 | struct omap_dss_device { |
| 596 | struct device dev; | 752 | /* old device, to be removed */ |
| 753 | struct device old_dev; | ||
| 754 | |||
| 755 | /* new device, pointer to panel device */ | ||
| 756 | struct device *dev; | ||
| 757 | |||
| 758 | struct module *owner; | ||
| 759 | |||
| 760 | struct list_head panel_list; | ||
| 761 | |||
| 762 | /* alias in the form of "display%d" */ | ||
| 763 | char alias[16]; | ||
| 597 | 764 | ||
| 598 | enum omap_display_type type; | 765 | enum omap_display_type type; |
| 766 | enum omap_display_type output_type; | ||
| 599 | 767 | ||
| 600 | /* obsolete, to be removed */ | 768 | /* obsolete, to be removed */ |
| 601 | enum omap_channel channel; | 769 | enum omap_channel channel; |
| @@ -616,9 +784,6 @@ struct omap_dss_device { | |||
| 616 | 784 | ||
| 617 | struct { | 785 | struct { |
| 618 | int module; | 786 | int module; |
| 619 | |||
| 620 | bool ext_te; | ||
| 621 | u8 ext_te_gpio; | ||
| 622 | } dsi; | 787 | } dsi; |
| 623 | 788 | ||
| 624 | struct { | 789 | struct { |
| @@ -639,10 +804,6 @@ struct omap_dss_device { | |||
| 639 | struct rfbi_timings rfbi_timings; | 804 | struct rfbi_timings rfbi_timings; |
| 640 | } ctrl; | 805 | } ctrl; |
| 641 | 806 | ||
| 642 | int reset_gpio; | ||
| 643 | |||
| 644 | int max_backlight_level; | ||
| 645 | |||
| 646 | const char *name; | 807 | const char *name; |
| 647 | 808 | ||
| 648 | /* used to match device to driver */ | 809 | /* used to match device to driver */ |
| @@ -652,22 +813,40 @@ struct omap_dss_device { | |||
| 652 | 813 | ||
| 653 | struct omap_dss_driver *driver; | 814 | struct omap_dss_driver *driver; |
| 654 | 815 | ||
| 816 | union { | ||
| 817 | const struct omapdss_dpi_ops *dpi; | ||
| 818 | const struct omapdss_sdi_ops *sdi; | ||
| 819 | const struct omapdss_dvi_ops *dvi; | ||
| 820 | const struct omapdss_hdmi_ops *hdmi; | ||
| 821 | const struct omapdss_atv_ops *atv; | ||
| 822 | const struct omapdss_dsi_ops *dsi; | ||
| 823 | } ops; | ||
| 824 | |||
| 655 | /* helper variable for driver suspend/resume */ | 825 | /* helper variable for driver suspend/resume */ |
| 656 | bool activate_after_resume; | 826 | bool activate_after_resume; |
| 657 | 827 | ||
| 658 | enum omap_display_caps caps; | 828 | enum omap_display_caps caps; |
| 659 | 829 | ||
| 660 | struct omap_dss_output *output; | 830 | struct omap_dss_device *output; |
| 661 | 831 | ||
| 662 | enum omap_dss_display_state state; | 832 | enum omap_dss_display_state state; |
| 663 | 833 | ||
| 664 | enum omap_dss_audio_state audio_state; | 834 | enum omap_dss_audio_state audio_state; |
| 665 | 835 | ||
| 666 | /* platform specific */ | 836 | /* OMAP DSS output specific fields */ |
| 667 | int (*platform_enable)(struct omap_dss_device *dssdev); | 837 | |
| 668 | void (*platform_disable)(struct omap_dss_device *dssdev); | 838 | struct list_head list; |
| 669 | int (*set_backlight)(struct omap_dss_device *dssdev, int level); | 839 | |
| 670 | int (*get_backlight)(struct omap_dss_device *dssdev); | 840 | /* DISPC channel for this output */ |
| 841 | enum omap_channel dispc_channel; | ||
| 842 | |||
| 843 | /* output instance */ | ||
| 844 | enum omap_dss_output_id id; | ||
| 845 | |||
| 846 | /* dynamic fields */ | ||
| 847 | struct omap_overlay_manager *manager; | ||
| 848 | |||
| 849 | struct omap_dss_device *device; | ||
| 671 | }; | 850 | }; |
| 672 | 851 | ||
| 673 | struct omap_dss_hdmi_data | 852 | struct omap_dss_hdmi_data |
| @@ -677,17 +856,15 @@ struct omap_dss_hdmi_data | |||
| 677 | int hpd_gpio; | 856 | int hpd_gpio; |
| 678 | }; | 857 | }; |
| 679 | 858 | ||
| 680 | struct omap_dss_audio { | ||
| 681 | struct snd_aes_iec958 *iec; | ||
| 682 | struct snd_cea_861_aud_if *cea; | ||
| 683 | }; | ||
| 684 | |||
| 685 | struct omap_dss_driver { | 859 | struct omap_dss_driver { |
| 686 | struct device_driver driver; | 860 | struct device_driver driver; |
| 687 | 861 | ||
| 688 | int (*probe)(struct omap_dss_device *); | 862 | int (*probe)(struct omap_dss_device *); |
| 689 | void (*remove)(struct omap_dss_device *); | 863 | void (*remove)(struct omap_dss_device *); |
| 690 | 864 | ||
| 865 | int (*connect)(struct omap_dss_device *dssdev); | ||
| 866 | void (*disconnect)(struct omap_dss_device *dssdev); | ||
| 867 | |||
| 691 | int (*enable)(struct omap_dss_device *display); | 868 | int (*enable)(struct omap_dss_device *display); |
| 692 | void (*disable)(struct omap_dss_device *display); | 869 | void (*disable)(struct omap_dss_device *display); |
| 693 | int (*run_test)(struct omap_dss_device *display, int test); | 870 | int (*run_test)(struct omap_dss_device *display, int test); |
| @@ -753,7 +930,10 @@ bool omapdss_is_initialized(void); | |||
| 753 | int omap_dss_register_driver(struct omap_dss_driver *); | 930 | int omap_dss_register_driver(struct omap_dss_driver *); |
| 754 | void omap_dss_unregister_driver(struct omap_dss_driver *); | 931 | void omap_dss_unregister_driver(struct omap_dss_driver *); |
| 755 | 932 | ||
| 756 | void omap_dss_get_device(struct omap_dss_device *dssdev); | 933 | int omapdss_register_display(struct omap_dss_device *dssdev); |
| 934 | void omapdss_unregister_display(struct omap_dss_device *dssdev); | ||
| 935 | |||
| 936 | struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev); | ||
| 757 | void omap_dss_put_device(struct omap_dss_device *dssdev); | 937 | void omap_dss_put_device(struct omap_dss_device *dssdev); |
| 758 | #define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL) | 938 | #define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL) |
| 759 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); | 939 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); |
| @@ -761,8 +941,10 @@ struct omap_dss_device *omap_dss_find_device(void *data, | |||
| 761 | int (*match)(struct omap_dss_device *dssdev, void *data)); | 941 | int (*match)(struct omap_dss_device *dssdev, void *data)); |
| 762 | const char *omapdss_get_default_display_name(void); | 942 | const char *omapdss_get_default_display_name(void); |
| 763 | 943 | ||
| 764 | int omap_dss_start_device(struct omap_dss_device *dssdev); | 944 | void videomode_to_omap_video_timings(const struct videomode *vm, |
| 765 | void omap_dss_stop_device(struct omap_dss_device *dssdev); | 945 | struct omap_video_timings *ovt); |
| 946 | void omap_video_timings_to_videomode(const struct omap_video_timings *ovt, | ||
| 947 | struct videomode *vm); | ||
| 766 | 948 | ||
| 767 | int dss_feat_get_num_mgrs(void); | 949 | int dss_feat_get_num_mgrs(void); |
| 768 | int dss_feat_get_num_ovls(void); | 950 | int dss_feat_get_num_ovls(void); |
| @@ -778,10 +960,17 @@ struct omap_overlay_manager *omap_dss_get_overlay_manager(int num); | |||
| 778 | int omap_dss_get_num_overlays(void); | 960 | int omap_dss_get_num_overlays(void); |
| 779 | struct omap_overlay *omap_dss_get_overlay(int num); | 961 | struct omap_overlay *omap_dss_get_overlay(int num); |
| 780 | 962 | ||
| 781 | struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id); | 963 | int omapdss_register_output(struct omap_dss_device *output); |
| 782 | int omapdss_output_set_device(struct omap_dss_output *out, | 964 | void omapdss_unregister_output(struct omap_dss_device *output); |
| 965 | struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id); | ||
| 966 | struct omap_dss_device *omap_dss_find_output(const char *name); | ||
| 967 | struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node); | ||
| 968 | int omapdss_output_set_device(struct omap_dss_device *out, | ||
| 783 | struct omap_dss_device *dssdev); | 969 | struct omap_dss_device *dssdev); |
| 784 | int omapdss_output_unset_device(struct omap_dss_output *out); | 970 | int omapdss_output_unset_device(struct omap_dss_device *out); |
| 971 | |||
| 972 | struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev); | ||
| 973 | struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev); | ||
| 785 | 974 | ||
| 786 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, | 975 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, |
| 787 | u16 *xres, u16 *yres); | 976 | u16 *xres, u16 *yres); |
| @@ -832,7 +1021,7 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, | |||
| 832 | bool mem_to_mem); | 1021 | bool mem_to_mem); |
| 833 | 1022 | ||
| 834 | #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) | 1023 | #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) |
| 835 | #define to_dss_device(x) container_of((x), struct omap_dss_device, dev) | 1024 | #define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev) |
| 836 | 1025 | ||
| 837 | void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, | 1026 | void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, |
| 838 | bool enable); | 1027 | bool enable); |
| @@ -883,6 +1072,11 @@ int omapdss_compat_init(void); | |||
| 883 | void omapdss_compat_uninit(void); | 1072 | void omapdss_compat_uninit(void); |
| 884 | 1073 | ||
| 885 | struct dss_mgr_ops { | 1074 | struct dss_mgr_ops { |
| 1075 | int (*connect)(struct omap_overlay_manager *mgr, | ||
| 1076 | struct omap_dss_device *dst); | ||
| 1077 | void (*disconnect)(struct omap_overlay_manager *mgr, | ||
| 1078 | struct omap_dss_device *dst); | ||
| 1079 | |||
| 886 | void (*start_update)(struct omap_overlay_manager *mgr); | 1080 | void (*start_update)(struct omap_overlay_manager *mgr); |
| 887 | int (*enable)(struct omap_overlay_manager *mgr); | 1081 | int (*enable)(struct omap_overlay_manager *mgr); |
| 888 | void (*disable)(struct omap_overlay_manager *mgr); | 1082 | void (*disable)(struct omap_overlay_manager *mgr); |
| @@ -899,6 +1093,10 @@ struct dss_mgr_ops { | |||
| 899 | int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops); | 1093 | int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops); |
| 900 | void dss_uninstall_mgr_ops(void); | 1094 | void dss_uninstall_mgr_ops(void); |
| 901 | 1095 | ||
| 1096 | int dss_mgr_connect(struct omap_overlay_manager *mgr, | ||
| 1097 | struct omap_dss_device *dst); | ||
| 1098 | void dss_mgr_disconnect(struct omap_overlay_manager *mgr, | ||
| 1099 | struct omap_dss_device *dst); | ||
| 902 | void dss_mgr_set_timings(struct omap_overlay_manager *mgr, | 1100 | void dss_mgr_set_timings(struct omap_overlay_manager *mgr, |
| 903 | const struct omap_video_timings *timings); | 1101 | const struct omap_video_timings *timings); |
| 904 | void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, | 1102 | void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, |
| @@ -910,4 +1108,15 @@ int dss_mgr_register_framedone_handler(struct omap_overlay_manager *mgr, | |||
| 910 | void (*handler)(void *), void *data); | 1108 | void (*handler)(void *), void *data); |
| 911 | void dss_mgr_unregister_framedone_handler(struct omap_overlay_manager *mgr, | 1109 | void dss_mgr_unregister_framedone_handler(struct omap_overlay_manager *mgr, |
| 912 | void (*handler)(void *), void *data); | 1110 | void (*handler)(void *), void *data); |
| 1111 | |||
| 1112 | static inline bool omapdss_device_is_connected(struct omap_dss_device *dssdev) | ||
| 1113 | { | ||
| 1114 | return dssdev->output; | ||
| 1115 | } | ||
| 1116 | |||
| 1117 | static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev) | ||
| 1118 | { | ||
| 1119 | return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE; | ||
| 1120 | } | ||
| 1121 | |||
| 913 | #endif | 1122 | #endif |
