aboutsummaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-05-27 16:58:20 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-05-27 16:58:20 -0400
commitd85d135d8babbc917b370f36cbc02b7b4a2f2d99 (patch)
tree2f06e02940d87099670aa31459ad1ab41a1ca036 /include/video
parent5e7b911f9a3e582635801675b7fe935b16cd4af5 (diff)
parente92a5b28f71aea01b281f9c89d97a4bc5b24748f (diff)
Merge tag 'omapdss-for-3.5' of git://github.com/tomba/linux into fbdev-next
Omapdss driver changes for 3.5 merge window. Lots of normal development commits, but perhaps most notable changes are: * HDMI rework to properly decouple the HDMI audio part from the HDMI video part. * Restructure omapdss core driver so that it's possible to implement device tree support. This included changing how platform data is passed to the drivers, changing display device registration and improving the panel driver's ability to configure the underlying video output interface. * Basic support for DSI packet interleaving
Diffstat (limited to 'include/video')
-rw-r--r--include/video/omap-panel-nokia-dsi.h3
-rw-r--r--include/video/omap-panel-tfp410.h (renamed from include/video/omap-panel-dvi.h)18
-rw-r--r--include/video/omapdss.h75
3 files changed, 68 insertions, 28 deletions
diff --git a/include/video/omap-panel-nokia-dsi.h b/include/video/omap-panel-nokia-dsi.h
index 7dc71f9c13e6..04219a295539 100644
--- a/include/video/omap-panel-nokia-dsi.h
+++ b/include/video/omap-panel-nokia-dsi.h
@@ -11,6 +11,7 @@ struct omap_dss_device;
11 * @esd_interval: interval of ESD checks, 0 = disabled (ms) 11 * @esd_interval: interval of ESD checks, 0 = disabled (ms)
12 * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) 12 * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
13 * @use_dsi_backlight: true if panel uses DSI command to control backlight 13 * @use_dsi_backlight: true if panel uses DSI command to control backlight
14 * @pin_config: DSI pin configuration
14 */ 15 */
15struct nokia_dsi_panel_data { 16struct nokia_dsi_panel_data {
16 const char *name; 17 const char *name;
@@ -24,6 +25,8 @@ struct nokia_dsi_panel_data {
24 unsigned ulps_timeout; 25 unsigned ulps_timeout;
25 26
26 bool use_dsi_backlight; 27 bool use_dsi_backlight;
28
29 struct omap_dsi_pin_config pin_config;
27}; 30};
28 31
29#endif /* __OMAP_NOKIA_DSI_PANEL_H */ 32#endif /* __OMAP_NOKIA_DSI_PANEL_H */
diff --git a/include/video/omap-panel-dvi.h b/include/video/omap-panel-tfp410.h
index 87ad567b4229..68c31d79c571 100644
--- a/include/video/omap-panel-dvi.h
+++ b/include/video/omap-panel-tfp410.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Header for DVI output driver 2 * Header for TFP410 chip driver
3 * 3 *
4 * Copyright (C) 2011 Texas Instruments Inc 4 * Copyright (C) 2011 Texas Instruments Inc
5 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> 5 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
@@ -17,21 +17,19 @@
17 * this program. If not, see <http://www.gnu.org/licenses/>. 17 * this program. If not, see <http://www.gnu.org/licenses/>.
18 */ 18 */
19 19
20#ifndef __OMAP_PANEL_DVI_H 20#ifndef __OMAP_PANEL_TFP410_H
21#define __OMAP_PANEL_DVI_H 21#define __OMAP_PANEL_TFP410_H
22 22
23struct omap_dss_device; 23struct omap_dss_device;
24 24
25/** 25/**
26 * struct panel_dvi_platform_data - panel driver configuration data 26 * struct tfp410_platform_data - panel driver configuration data
27 * @platform_enable: platform specific panel enable function
28 * @platform_disable: platform specific panel disable function
29 * @i2c_bus_num: i2c bus id for the panel 27 * @i2c_bus_num: i2c bus id for the panel
28 * @power_down_gpio: gpio number for PD pin (or -1 if not available)
30 */ 29 */
31struct panel_dvi_platform_data { 30struct tfp410_platform_data {
32 int (*platform_enable)(struct omap_dss_device *dssdev);
33 void (*platform_disable)(struct omap_dss_device *dssdev);
34 u16 i2c_bus_num; 31 u16 i2c_bus_num;
32 int power_down_gpio;
35}; 33};
36 34
37#endif /* __OMAP_PANEL_DVI_H */ 35#endif /* __OMAP_PANEL_TFP410_H */
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 483f67caa7ad..c8e59b4a3364 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -51,6 +51,8 @@
51 51
52struct omap_dss_device; 52struct omap_dss_device;
53struct omap_overlay_manager; 53struct omap_overlay_manager;
54struct snd_aes_iec958;
55struct snd_cea_861_aud_if;
54 56
55enum omap_display_type { 57enum omap_display_type {
56 OMAP_DISPLAY_TYPE_NONE = 0, 58 OMAP_DISPLAY_TYPE_NONE = 0,
@@ -158,6 +160,13 @@ enum omap_dss_display_state {
158 OMAP_DSS_DISPLAY_SUSPENDED, 160 OMAP_DSS_DISPLAY_SUSPENDED,
159}; 161};
160 162
163enum omap_dss_audio_state {
164 OMAP_DSS_AUDIO_DISABLED = 0,
165 OMAP_DSS_AUDIO_ENABLED,
166 OMAP_DSS_AUDIO_CONFIGURED,
167 OMAP_DSS_AUDIO_PLAYING,
168};
169
161/* XXX perhaps this should be removed */ 170/* XXX perhaps this should be removed */
162enum omap_dss_overlay_managers { 171enum omap_dss_overlay_managers {
163 OMAP_DSS_OVL_MGR_LCD, 172 OMAP_DSS_OVL_MGR_LCD,
@@ -166,8 +175,9 @@ enum omap_dss_overlay_managers {
166}; 175};
167 176
168enum omap_dss_rotation_type { 177enum omap_dss_rotation_type {
169 OMAP_DSS_ROT_DMA = 0, 178 OMAP_DSS_ROT_DMA = 1 << 0,
170 OMAP_DSS_ROT_VRFB = 1, 179 OMAP_DSS_ROT_VRFB = 1 << 1,
180 OMAP_DSS_ROT_TILER = 1 << 2,
171}; 181};
172 182
173/* clockwise rotation angle */ 183/* clockwise rotation angle */
@@ -309,6 +319,7 @@ struct omap_dss_board_info {
309 struct omap_dss_device *default_device; 319 struct omap_dss_device *default_device;
310 int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); 320 int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask);
311 void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); 321 void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask);
322 int (*set_min_bus_tput)(struct device *dev, unsigned long r);
312}; 323};
313 324
314/* Init with the board info */ 325/* Init with the board info */
@@ -316,11 +327,6 @@ extern int omap_display_init(struct omap_dss_board_info *board_data);
316/* HDMI mux init*/ 327/* HDMI mux init*/
317extern int omap_hdmi_init(enum omap_hdmi_flags flags); 328extern int omap_hdmi_init(enum omap_hdmi_flags flags);
318 329
319struct omap_display_platform_data {
320 struct omap_dss_board_info *board_data;
321 /* TODO: Additional members to be added when PM is considered */
322};
323
324struct omap_video_timings { 330struct omap_video_timings {
325 /* Unit: pixels */ 331 /* Unit: pixels */
326 u16 x_res; 332 u16 x_res;
@@ -468,6 +474,21 @@ struct omap_overlay_manager {
468 int (*wait_for_vsync)(struct omap_overlay_manager *mgr); 474 int (*wait_for_vsync)(struct omap_overlay_manager *mgr);
469}; 475};
470 476
477/* 22 pins means 1 clk lane and 10 data lanes */
478#define OMAP_DSS_MAX_DSI_PINS 22
479
480struct omap_dsi_pin_config {
481 int num_pins;
482 /*
483 * pin numbers in the following order:
484 * clk+, clk-
485 * data1+, data1-
486 * data2+, data2-
487 * ...
488 */
489 int pins[OMAP_DSS_MAX_DSI_PINS];
490};
491
471struct omap_dss_device { 492struct omap_dss_device {
472 struct device dev; 493 struct device dev;
473 494
@@ -490,17 +511,6 @@ struct omap_dss_device {
490 } sdi; 511 } sdi;
491 512
492 struct { 513 struct {
493 u8 clk_lane;
494 u8 clk_pol;
495 u8 data1_lane;
496 u8 data1_pol;
497 u8 data2_lane;
498 u8 data2_pol;
499 u8 data3_lane;
500 u8 data3_pol;
501 u8 data4_lane;
502 u8 data4_pol;
503
504 int module; 514 int module;
505 515
506 bool ext_te; 516 bool ext_te;
@@ -583,6 +593,8 @@ struct omap_dss_device {
583 593
584 enum omap_dss_display_state state; 594 enum omap_dss_display_state state;
585 595
596 enum omap_dss_audio_state audio_state;
597
586 /* platform specific */ 598 /* platform specific */
587 int (*platform_enable)(struct omap_dss_device *dssdev); 599 int (*platform_enable)(struct omap_dss_device *dssdev);
588 void (*platform_disable)(struct omap_dss_device *dssdev); 600 void (*platform_disable)(struct omap_dss_device *dssdev);
@@ -595,6 +607,11 @@ struct omap_dss_hdmi_data
595 int hpd_gpio; 607 int hpd_gpio;
596}; 608};
597 609
610struct omap_dss_audio {
611 struct snd_aes_iec958 *iec;
612 struct snd_cea_861_aud_if *cea;
613};
614
598struct omap_dss_driver { 615struct omap_dss_driver {
599 struct device_driver driver; 616 struct device_driver driver;
600 617
@@ -642,6 +659,24 @@ struct omap_dss_driver {
642 659
643 int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); 660 int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
644 bool (*detect)(struct omap_dss_device *dssdev); 661 bool (*detect)(struct omap_dss_device *dssdev);
662
663 /*
664 * For display drivers that support audio. This encompasses
665 * HDMI and DisplayPort at the moment.
666 */
667 /*
668 * Note: These functions might sleep. Do not call while
669 * holding a spinlock/readlock.
670 */
671 int (*audio_enable)(struct omap_dss_device *dssdev);
672 void (*audio_disable)(struct omap_dss_device *dssdev);
673 bool (*audio_supported)(struct omap_dss_device *dssdev);
674 int (*audio_config)(struct omap_dss_device *dssdev,
675 struct omap_dss_audio *audio);
676 /* Note: These functions may not sleep */
677 int (*audio_start)(struct omap_dss_device *dssdev);
678 void (*audio_stop)(struct omap_dss_device *dssdev);
679
645}; 680};
646 681
647int omap_dss_register_driver(struct omap_dss_driver *); 682int omap_dss_register_driver(struct omap_dss_driver *);
@@ -666,6 +701,8 @@ struct omap_overlay *omap_dss_get_overlay(int num);
666void omapdss_default_get_resolution(struct omap_dss_device *dssdev, 701void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
667 u16 *xres, u16 *yres); 702 u16 *xres, u16 *yres);
668int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); 703int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev);
704void omapdss_default_get_timings(struct omap_dss_device *dssdev,
705 struct omap_video_timings *timings);
669 706
670typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); 707typedef void (*omap_dispc_isr_t) (void *arg, u32 mask);
671int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); 708int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
@@ -687,6 +724,8 @@ int omap_dsi_update(struct omap_dss_device *dssdev, int channel,
687int omap_dsi_request_vc(struct omap_dss_device *dssdev, int *channel); 724int omap_dsi_request_vc(struct omap_dss_device *dssdev, int *channel);
688int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id); 725int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id);
689void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); 726void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel);
727int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev,
728 const struct omap_dsi_pin_config *pin_cfg);
690 729
691int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); 730int omapdss_dsi_display_enable(struct omap_dss_device *dssdev);
692void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, 731void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,