+ struct omap_drm_private *priv = crtc->dev->dev_private;
+ struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
+ unsigned int i;
+
+ DBG("%s", omap_crtc->name);
+
+ if (!omap_crtc->enabled)
+ return;
+
+ omap_crtc_wait_page_flip(crtc);
+ dispc_runtime_get();
+ drm_crtc_vblank_off(crtc);
+ dispc_runtime_put();
+
+ /* Disable all planes associated with the CRTC. */
+ for (i = 0; i < priv->num_planes; i++) {
+ struct drm_plane *plane = priv->planes[i];
+
+ if (plane->crtc == crtc)
+ WARN_ON(omap_plane_set_enable(plane, false));
+ }
+
+ omap_crtc->enabled = false;
+
+ omap_crtc_setup(crtc);
+ omap_crtc_flush(crtc);