]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - drivers/gpu/drm/drm_atomic_helper.c
drm: Add old state pointer to CRTC .enable() helper function
[mirror_ubuntu-focal-kernel.git] / drivers / gpu / drm / drm_atomic_helper.c
index 2f269e4267da1c8fd40cf11da9deb0c1cad68b1b..23e4661a62feaa56423cc36538f513b61a24c60f 100644 (file)
@@ -1069,12 +1069,13 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
                                              struct drm_atomic_state *old_state)
 {
        struct drm_crtc *crtc;
+       struct drm_crtc_state *old_crtc_state;
        struct drm_crtc_state *new_crtc_state;
        struct drm_connector *connector;
        struct drm_connector_state *new_conn_state;
        int i;
 
-       for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
+       for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
                const struct drm_crtc_helper_funcs *funcs;
 
                /* Need to filter out CRTCs where only planes change. */
@@ -1090,8 +1091,8 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
                        DRM_DEBUG_ATOMIC("enabling [CRTC:%d:%s]\n",
                                         crtc->base.id, crtc->name);
 
-                       if (funcs->enable)
-                               funcs->enable(crtc);
+                       if (funcs->atomic_enable)
+                               funcs->atomic_enable(crtc, old_crtc_state);
                        else
                                funcs->commit(crtc);
                }