Commit 663a3640 authored by Chandra Konduru's avatar Chandra Konduru Committed by Daniel Vetter

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: default avatarChandra Konduru <chandra.konduru@intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 6a60cd87
...@@ -10839,11 +10839,14 @@ static void ...@@ -10839,11 +10839,14 @@ static void
clear_intel_crtc_state(struct intel_crtc_state *crtc_state) clear_intel_crtc_state(struct intel_crtc_state *crtc_state)
{ {
struct drm_crtc_state tmp_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; tmp_state = crtc_state->base;
scaler_state = crtc_state->scaler_state;
memset(crtc_state, 0, sizeof *crtc_state); memset(crtc_state, 0, sizeof *crtc_state);
crtc_state->base = tmp_state; crtc_state->base = tmp_state;
crtc_state->scaler_state = scaler_state;
} }
static struct intel_crtc_state * static struct intel_crtc_state *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment