const char *name;
enum omap_channel channel;
- struct drm_encoder *current_encoder;
/*
* Temporary: eventually this will go away, but it is needed
return dispc_mgr_get_vsync_irq(omap_crtc->channel);
}
-const struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc)
+struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc)
{
struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
return &omap_crtc->timings;
{
}
-/* Called only from omap_crtc_encoder_setup and suspend/resume handlers. */
+/* Called only from the encoder enable/disable and suspend/resume handlers. */
static void omap_crtc_set_enabled(struct drm_crtc *crtc, bool enable)
{
struct drm_device *dev = crtc->dev;
return 0;
}
-static void omap_crtc_encoder_setup(struct drm_crtc *crtc, bool enable)
-{
- struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
- struct omap_drm_private *priv = crtc->dev->dev_private;
- struct drm_encoder *encoder = NULL;
- unsigned int i;
-
- DBG("%s: enable=%d", omap_crtc->name, enable);
-
- for (i = 0; i < priv->num_encoders; i++) {
- if (priv->encoders[i]->crtc == crtc) {
- encoder = priv->encoders[i];
- break;
- }
- }
-
- if (omap_crtc->current_encoder && encoder != omap_crtc->current_encoder)
- omap_encoder_set_enabled(omap_crtc->current_encoder, false);
-
- omap_crtc->current_encoder = encoder;
-
- if (encoder) {
- omap_encoder_set_enabled(encoder, false);
- if (enable) {
- omap_encoder_update(encoder, omap_crtc->mgr,
- &omap_crtc->timings);
- omap_encoder_set_enabled(encoder, true);
- }
- }
-}
-
/* -----------------------------------------------------------------------------
* CRTC Functions
*/
WARN_ON(omap_plane_setup(plane));
}
- omap_crtc_encoder_setup(crtc, true);
omap_crtc_flush(crtc);
drm_crtc_vblank_on(crtc);
WARN_ON(omap_plane_setup(plane));
}
- omap_crtc_encoder_setup(crtc, false);
omap_crtc_flush(crtc);
}