}
  
  static void
- sti_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
+ sti_crtc_mode_set_nofb(struct drm_crtc *crtc)
  {
-       sti_drm_crtc_prepare(crtc);
-       sti_drm_crtc_mode_set(crtc, &crtc->state->adjusted_mode);
+       sti_crtc_enable(crtc);
+       sti_crtc_mode_set(crtc, &crtc->state->adjusted_mode);
  }
  
- static void sti_drm_atomic_begin(struct drm_crtc *crtc,
-                                struct drm_crtc_state *old_crtc_state)
 -static void sti_crtc_atomic_begin(struct drm_crtc *crtc)
++static void sti_crtc_atomic_begin(struct drm_crtc *crtc,
++                                struct drm_crtc_state *old_crtc_state)
  {
        struct sti_mixer *mixer = to_sti_mixer(crtc);
  
        }
  }
  
- static void sti_drm_atomic_flush(struct drm_crtc *crtc,
-                                struct drm_crtc_state *old_crtc_state)
 -static void sti_crtc_atomic_flush(struct drm_crtc *crtc)
++static void sti_crtc_atomic_flush(struct drm_crtc *crtc,
++                                struct drm_crtc_state *old_crtc_state)
  {
+       struct drm_device *drm_dev = crtc->dev;
+       struct sti_mixer *mixer = to_sti_mixer(crtc);
+       struct sti_compositor *compo = dev_get_drvdata(mixer->dev);
+       struct drm_plane *p;
+ 
+       DRM_DEBUG_DRIVER("\n");
+ 
+       /* perform plane actions */
+       list_for_each_entry(p, &drm_dev->mode_config.plane_list, head) {
+               struct sti_plane *plane = to_sti_plane(p);
+ 
+               switch (plane->status) {
+               case STI_PLANE_UPDATED:
+                       /* update planes tag as updated */
+                       DRM_DEBUG_DRIVER("update plane %s\n",
+                                        sti_plane_to_str(plane));
+ 
+                       if (sti_mixer_set_plane_depth(mixer, plane)) {
+                               DRM_ERROR("Cannot set plane %s depth\n",
+                                         sti_plane_to_str(plane));
+                               break;
+                       }
+ 
+                       if (sti_mixer_set_plane_status(mixer, plane, true)) {
+                               DRM_ERROR("Cannot enable plane %s at mixer\n",
+                                         sti_plane_to_str(plane));
+                               break;
+                       }
+ 
+                       /* if plane is HQVDP_0 then commit the vid[0] */
+                       if (plane->desc == STI_HQVDP_0)
+                               sti_vid_commit(compo->vid[0], p->state);
+ 
+                       plane->status = STI_PLANE_READY;
+ 
+                       break;
+               case STI_PLANE_DISABLING:
+                       /* disabling sequence for planes tag as disabling */
+                       DRM_DEBUG_DRIVER("disable plane %s from mixer\n",
+                                        sti_plane_to_str(plane));
+ 
+                       if (sti_mixer_set_plane_status(mixer, plane, false)) {
+                               DRM_ERROR("Cannot disable plane %s at mixer\n",
+                                         sti_plane_to_str(plane));
+                               continue;
+                       }
+ 
+                       if (plane->desc == STI_CURSOR)
+                               /* tag plane status for disabled */
+                               plane->status = STI_PLANE_DISABLED;
+                       else
+                               /* tag plane status for flushing */
+                               plane->status = STI_PLANE_FLUSHING;
+ 
+                       /* if plane is HQVDP_0 then disable the vid[0] */
+                       if (plane->desc == STI_HQVDP_0)
+                               sti_vid_disable(compo->vid[0]);
+ 
+                       break;
+               default:
+                       /* Other status case are not handled */
+                       break;
+               }
+       }
  }
  
  static struct drm_crtc_helper_funcs sti_crtc_helper_funcs = {