aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss/output.c')
-rw-r--r--drivers/video/omap2/dss/output.c90
1 files changed, 61 insertions, 29 deletions
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 813f26682b7a..79dea1a1a732 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -114,35 +114,67 @@ struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id)
114 return NULL; 114 return NULL;
115} 115}
116 116
117struct omap_dss_output *omapdss_get_output_from_dssdev(struct omap_dss_device *dssdev) 117static const struct dss_mgr_ops *dss_mgr_ops;
118
119int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops)
118{ 120{
119 struct omap_dss_output *out = NULL; 121 if (dss_mgr_ops)
120 enum omap_dss_output_id id; 122 return -EBUSY;
121 123
122 switch (dssdev->type) { 124 dss_mgr_ops = mgr_ops;
123 case OMAP_DISPLAY_TYPE_DPI: 125
124 out = omap_dss_get_output(OMAP_DSS_OUTPUT_DPI); 126 return 0;
125 break; 127}
126 case OMAP_DISPLAY_TYPE_DBI: 128EXPORT_SYMBOL(dss_install_mgr_ops);
127 out = omap_dss_get_output(OMAP_DSS_OUTPUT_DBI); 129
128 break; 130void dss_uninstall_mgr_ops(void)
129 case OMAP_DISPLAY_TYPE_SDI: 131{
130 out = omap_dss_get_output(OMAP_DSS_OUTPUT_SDI); 132 dss_mgr_ops = NULL;
131 break; 133}
132 case OMAP_DISPLAY_TYPE_VENC: 134EXPORT_SYMBOL(dss_uninstall_mgr_ops);
133 out = omap_dss_get_output(OMAP_DSS_OUTPUT_VENC); 135
134 break; 136void dss_mgr_set_timings(struct omap_overlay_manager *mgr,
135 case OMAP_DISPLAY_TYPE_HDMI: 137 const struct omap_video_timings *timings)
136 out = omap_dss_get_output(OMAP_DSS_OUTPUT_HDMI); 138{
137 break; 139 dss_mgr_ops->set_timings(mgr, timings);
138 case OMAP_DISPLAY_TYPE_DSI: 140}
139 id = dssdev->phy.dsi.module == 0 ? OMAP_DSS_OUTPUT_DSI1 : 141EXPORT_SYMBOL(dss_mgr_set_timings);
140 OMAP_DSS_OUTPUT_DSI2; 142
141 out = omap_dss_get_output(id); 143void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr,
142 break; 144 const struct dss_lcd_mgr_config *config)
143 default: 145{
144 break; 146 dss_mgr_ops->set_lcd_config(mgr, config);
145 } 147}
148EXPORT_SYMBOL(dss_mgr_set_lcd_config);
149
150int dss_mgr_enable(struct omap_overlay_manager *mgr)
151{
152 return dss_mgr_ops->enable(mgr);
153}
154EXPORT_SYMBOL(dss_mgr_enable);
155
156void dss_mgr_disable(struct omap_overlay_manager *mgr)
157{
158 dss_mgr_ops->disable(mgr);
159}
160EXPORT_SYMBOL(dss_mgr_disable);
146 161
147 return out; 162void dss_mgr_start_update(struct omap_overlay_manager *mgr)
163{
164 dss_mgr_ops->start_update(mgr);
165}
166EXPORT_SYMBOL(dss_mgr_start_update);
167
168int dss_mgr_register_framedone_handler(struct omap_overlay_manager *mgr,
169 void (*handler)(void *), void *data)
170{
171 return dss_mgr_ops->register_framedone_handler(mgr, handler, data);
172}
173EXPORT_SYMBOL(dss_mgr_register_framedone_handler);
174
175void dss_mgr_unregister_framedone_handler(struct omap_overlay_manager *mgr,
176 void (*handler)(void *), void *data)
177{
178 dss_mgr_ops->unregister_framedone_handler(mgr, handler, data);
148} 179}
180EXPORT_SYMBOL(dss_mgr_unregister_framedone_handler);