aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_crtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_crtc.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_crtc.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 95615a86e9f7..61d8d17a4243 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -113,7 +113,8 @@ static struct omap_crtc *omap_crtcs[8];
113static struct omap_dss_device *omap_crtc_output[8]; 113static struct omap_dss_device *omap_crtc_output[8];
114 114
115/* we can probably ignore these until we support command-mode panels: */ 115/* we can probably ignore these until we support command-mode panels: */
116static int omap_crtc_dss_connect(enum omap_channel channel, 116static int omap_crtc_dss_connect(struct omap_drm_private *priv,
117 enum omap_channel channel,
117 struct omap_dss_device *dst) 118 struct omap_dss_device *dst)
118{ 119{
119 const struct dispc_ops *dispc_ops = dispc_get_ops(); 120 const struct dispc_ops *dispc_ops = dispc_get_ops();
@@ -130,14 +131,16 @@ static int omap_crtc_dss_connect(enum omap_channel channel,
130 return 0; 131 return 0;
131} 132}
132 133
133static void omap_crtc_dss_disconnect(enum omap_channel channel, 134static void omap_crtc_dss_disconnect(struct omap_drm_private *priv,
135 enum omap_channel channel,
134 struct omap_dss_device *dst) 136 struct omap_dss_device *dst)
135{ 137{
136 omap_crtc_output[channel] = NULL; 138 omap_crtc_output[channel] = NULL;
137 dst->dispc_channel_connected = false; 139 dst->dispc_channel_connected = false;
138} 140}
139 141
140static void omap_crtc_dss_start_update(enum omap_channel channel) 142static void omap_crtc_dss_start_update(struct omap_drm_private *priv,
143 enum omap_channel channel)
141{ 144{
142} 145}
143 146
@@ -207,10 +210,10 @@ static void omap_crtc_set_enabled(struct drm_crtc *crtc, bool enable)
207} 210}
208 211
209 212
210static int omap_crtc_dss_enable(enum omap_channel channel) 213static int omap_crtc_dss_enable(struct omap_drm_private *priv,
214 enum omap_channel channel)
211{ 215{
212 struct omap_crtc *omap_crtc = omap_crtcs[channel]; 216 struct omap_crtc *omap_crtc = omap_crtcs[channel];
213 struct omap_drm_private *priv = omap_crtc->base.dev->dev_private;
214 217
215 priv->dispc_ops->mgr_set_timings(omap_crtc->channel, &omap_crtc->vm); 218 priv->dispc_ops->mgr_set_timings(omap_crtc->channel, &omap_crtc->vm);
216 omap_crtc_set_enabled(&omap_crtc->base, true); 219 omap_crtc_set_enabled(&omap_crtc->base, true);
@@ -218,14 +221,16 @@ static int omap_crtc_dss_enable(enum omap_channel channel)
218 return 0; 221 return 0;
219} 222}
220 223
221static void omap_crtc_dss_disable(enum omap_channel channel) 224static void omap_crtc_dss_disable(struct omap_drm_private *priv,
225 enum omap_channel channel)
222{ 226{
223 struct omap_crtc *omap_crtc = omap_crtcs[channel]; 227 struct omap_crtc *omap_crtc = omap_crtcs[channel];
224 228
225 omap_crtc_set_enabled(&omap_crtc->base, false); 229 omap_crtc_set_enabled(&omap_crtc->base, false);
226} 230}
227 231
228static void omap_crtc_dss_set_timings(enum omap_channel channel, 232static void omap_crtc_dss_set_timings(struct omap_drm_private *priv,
233 enum omap_channel channel,
229 const struct videomode *vm) 234 const struct videomode *vm)
230{ 235{
231 struct omap_crtc *omap_crtc = omap_crtcs[channel]; 236 struct omap_crtc *omap_crtc = omap_crtcs[channel];
@@ -233,25 +238,25 @@ static void omap_crtc_dss_set_timings(enum omap_channel channel,
233 omap_crtc->vm = *vm; 238 omap_crtc->vm = *vm;
234} 239}
235 240
236static void omap_crtc_dss_set_lcd_config(enum omap_channel channel, 241static void omap_crtc_dss_set_lcd_config(struct omap_drm_private *priv,
242 enum omap_channel channel,
237 const struct dss_lcd_mgr_config *config) 243 const struct dss_lcd_mgr_config *config)
238{ 244{
239 struct omap_crtc *omap_crtc = omap_crtcs[channel]; 245 struct omap_crtc *omap_crtc = omap_crtcs[channel];
240 struct omap_drm_private *priv = omap_crtc->base.dev->dev_private;
241 246
242 DBG("%s", omap_crtc->name); 247 DBG("%s", omap_crtc->name);
243 priv->dispc_ops->mgr_set_lcd_config(omap_crtc->channel, config); 248 priv->dispc_ops->mgr_set_lcd_config(omap_crtc->channel, config);
244} 249}
245 250
246static int omap_crtc_dss_register_framedone( 251static int omap_crtc_dss_register_framedone(
247 enum omap_channel channel, 252 struct omap_drm_private *priv, enum omap_channel channel,
248 void (*handler)(void *), void *data) 253 void (*handler)(void *), void *data)
249{ 254{
250 return 0; 255 return 0;
251} 256}
252 257
253static void omap_crtc_dss_unregister_framedone( 258static void omap_crtc_dss_unregister_framedone(
254 enum omap_channel channel, 259 struct omap_drm_private *priv, enum omap_channel channel,
255 void (*handler)(void *), void *data) 260 void (*handler)(void *), void *data)
256{ 261{
257} 262}
@@ -669,11 +674,11 @@ static const char *channel_names[] = {
669 [OMAP_DSS_CHANNEL_LCD3] = "lcd3", 674 [OMAP_DSS_CHANNEL_LCD3] = "lcd3",
670}; 675};
671 676
672void omap_crtc_pre_init(void) 677void omap_crtc_pre_init(struct omap_drm_private *priv)
673{ 678{
674 memset(omap_crtcs, 0, sizeof(omap_crtcs)); 679 memset(omap_crtcs, 0, sizeof(omap_crtcs));
675 680
676 dss_install_mgr_ops(&mgr_ops); 681 dss_install_mgr_ops(&mgr_ops, priv);
677} 682}
678 683
679void omap_crtc_pre_uninit(void) 684void omap_crtc_pre_uninit(void)