aboutsummaryrefslogtreecommitdiffstats
path: root/include/video/omapdss.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-05-08 09:23:32 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 07:00:43 -0400
commita7e71e7f9fc7924921081aa55ceafca00d2c9f49 (patch)
treea7aacbb4520023a99d268c0e859a483049d1d467 /include/video/omapdss.h
parent04b1fc0291674666110fffd09b30d8304aaa4602 (diff)
OMAPDSS: Implement display (dis)connect support
We currently have two steps in panel initialization and startup: probing and enabling. After the panel has been probed, it's ready and can be configured and later enabled. This model is not enough with more complex display pipelines, where we may have, for example, two panels, of which only one can be used at a time, connected to the same video output. To support that kind of scenarios, we need to add new step to the initialization: connect. This patch adds support for connecting and disconnecting panels. After probe, but before connect, no panel ops should be called. When the connect is called, a proper video pipeline is established, and the panel is ready for use. If some part in the video pipeline is already connected (by some other panel), the connect call fails. One key difference with the old style setup is that connect() handles also connecting to the overlay manager. This means that the omapfb (or omapdrm) no longer needs to figure out which overlay manager to use, but it can just call connect() on the panel, and the proper overlay manager is connected by omapdss. This also allows us to add back the support for dynamic switching between two exclusive panels. However, the current panel device model is not changed to support this, as the new device model is implemented in the following patches and the old model will be removed. The new device model supports dynamic switching. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'include/video/omapdss.h')
-rw-r--r--include/video/omapdss.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 898f81247859..4f52f523fba4 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -689,6 +689,9 @@ struct omap_dss_driver {
689 int (*probe)(struct omap_dss_device *); 689 int (*probe)(struct omap_dss_device *);
690 void (*remove)(struct omap_dss_device *); 690 void (*remove)(struct omap_dss_device *);
691 691
692 int (*connect)(struct omap_dss_device *dssdev);
693 void (*disconnect)(struct omap_dss_device *dssdev);
694
692 int (*enable)(struct omap_dss_device *display); 695 int (*enable)(struct omap_dss_device *display);
693 void (*disable)(struct omap_dss_device *display); 696 void (*disable)(struct omap_dss_device *display);
694 int (*run_test)(struct omap_dss_device *display, int test); 697 int (*run_test)(struct omap_dss_device *display, int test);
@@ -889,6 +892,11 @@ int omapdss_compat_init(void);
889void omapdss_compat_uninit(void); 892void omapdss_compat_uninit(void);
890 893
891struct dss_mgr_ops { 894struct dss_mgr_ops {
895 int (*connect)(struct omap_overlay_manager *mgr,
896 struct omap_dss_output *dst);
897 void (*disconnect)(struct omap_overlay_manager *mgr,
898 struct omap_dss_output *dst);
899
892 void (*start_update)(struct omap_overlay_manager *mgr); 900 void (*start_update)(struct omap_overlay_manager *mgr);
893 int (*enable)(struct omap_overlay_manager *mgr); 901 int (*enable)(struct omap_overlay_manager *mgr);
894 void (*disable)(struct omap_overlay_manager *mgr); 902 void (*disable)(struct omap_overlay_manager *mgr);
@@ -905,6 +913,10 @@ struct dss_mgr_ops {
905int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops); 913int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops);
906void dss_uninstall_mgr_ops(void); 914void dss_uninstall_mgr_ops(void);
907 915
916int dss_mgr_connect(struct omap_overlay_manager *mgr,
917 struct omap_dss_output *dst);
918void dss_mgr_disconnect(struct omap_overlay_manager *mgr,
919 struct omap_dss_output *dst);
908void dss_mgr_set_timings(struct omap_overlay_manager *mgr, 920void dss_mgr_set_timings(struct omap_overlay_manager *mgr,
909 const struct omap_video_timings *timings); 921 const struct omap_video_timings *timings);
910void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, 922void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr,
@@ -916,4 +928,15 @@ int dss_mgr_register_framedone_handler(struct omap_overlay_manager *mgr,
916 void (*handler)(void *), void *data); 928 void (*handler)(void *), void *data);
917void dss_mgr_unregister_framedone_handler(struct omap_overlay_manager *mgr, 929void dss_mgr_unregister_framedone_handler(struct omap_overlay_manager *mgr,
918 void (*handler)(void *), void *data); 930 void (*handler)(void *), void *data);
931
932static inline bool omapdss_device_is_connected(struct omap_dss_device *dssdev)
933{
934 return dssdev->output;
935}
936
937static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev)
938{
939 return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
940}
941
919#endif 942#endif