From: Chandra Konduru Date: Tue, 7 Apr 2015 22:28:41 +0000 (-0700) Subject: drm/i915: Preserve scaler state when clearing crtc_state X-Git-Tag: v4.2-rc1~13^2~58^2~72 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=663a36407a71b3a98cea087f9a215660a6d6e387;p=karo-tx-linux.git drm/i915: Preserve scaler state when clearing crtc_state 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 Reviewed-by: Matt Roper Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 26f1602bec68..c14ab7b2f831 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -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 *