drm/i915: copy staged scaler state from drm state to crtc->config.
authorChandra Konduru <chandra.konduru@intel.com>
Tue, 7 Apr 2015 22:28:44 +0000 (15:28 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 13 Apr 2015 09:44:09 +0000 (11:44 +0200)
This is required for commit to perform as per staged assignment
of scalers until atomic crtc commit function is available.

As a place holder doing this copy from intel_atomic_commit for
scaling to operate correctly.

Signed-off-by: Chandra Konduru <chandra.konduru@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_atomic.c

index 42045ce2989829f9677310b91294abd0fa364dcf..3c4b7cdeab7760775eccffb13bf0c4061b53b246 100644 (file)
@@ -168,6 +168,18 @@ int intel_atomic_commit(struct drm_device *dev,
                swap(state->plane_states[i], plane->state);
                plane->state->state = NULL;
        }
+
+       /* swap crtc_state */
+       for (i = 0; i < dev->mode_config.num_crtc; i++) {
+               struct drm_crtc *crtc = state->crtcs[i];
+               if (!crtc) {
+                       continue;
+               }
+
+               to_intel_crtc(crtc)->config->scaler_state =
+                       to_intel_crtc_state(state->crtc_states[i])->scaler_state;
+       }
+
        drm_atomic_helper_commit_planes(dev, state);
        drm_atomic_helper_wait_for_vblanks(dev, state);
        drm_atomic_helper_cleanup_planes(dev, state);