]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915: Preserve scaler state when clearing crtc_state
authorChandra Konduru <chandra.konduru@intel.com>
Tue, 7 Apr 2015 22:28:41 +0000 (15:28 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 13 Apr 2015 09:30:54 +0000 (11:30 +0200)
crtc_state is cleared during mode set which wipes out complete
scaler state too. This is causing issues. To fix, ensure scaler
state is preserved because it contains not only crtc
scaler usage, but also planes using scalers on this crtc.

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_display.c

index 26f1602bec68b0d5afe9bf642441b3cd7d2d28ce..c14ab7b2f831bf8d492fe8006d37f50c5c777fcb 100644 (file)
@@ -10839,11 +10839,14 @@ static void
 clear_intel_crtc_state(struct intel_crtc_state *crtc_state)
 {
        struct drm_crtc_state tmp_state;
+       struct intel_crtc_scaler_state scaler_state;
 
-       /* Clear only the intel specific part of the crtc state */
+       /* Clear only the intel specific part of the crtc state excluding scalers */
        tmp_state = crtc_state->base;
+       scaler_state = crtc_state->scaler_state;
        memset(crtc_state, 0, sizeof *crtc_state);
        crtc_state->base = tmp_state;
+       crtc_state->scaler_state = scaler_state;
 }
 
 static struct intel_crtc_state *