drm/i915: Preserve crtc_state->inherited during state clearing
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 23 Feb 2023 15:20:48 +0000 (17:20 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 10 Mar 2023 12:28:12 +0000 (14:28 +0200)
intel_crtc_prepare_cleared_state() is unintentionally losing
the "inherited" flag. This will happen if intel_initial_commit()
is forced to go through the full modeset calculations for
whatever reason.

Afterwards the first real commit from userspace will not get
forced to the full modeset path, and thus eg. audio state may
not get recomputed properly. So if the monitor was already
enabled during boot audio will not work until userspace itself
does an explicit full modeset.

Cc: stable@vger.kernel.org
Tested-by: Lee Shawn C <shawn.c.lee@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230223152048.20878-1-ville.syrjala@linux.intel.com
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
drivers/gpu/drm/i915/display/intel_display.c

index 7f2f736a0deef46595e6e96eae824b39190a5d17..d96f7bbca30f07755e46d50294d74fc4b18f4ee1 100644 (file)
@@ -5079,6 +5079,7 @@ intel_crtc_prepare_cleared_state(struct intel_atomic_state *state,
         * only fields that are know to not cause problems are preserved. */
 
        saved_state->uapi = crtc_state->uapi;
+       saved_state->inherited = crtc_state->inherited;
        saved_state->scaler_state = crtc_state->scaler_state;
        saved_state->shared_dpll = crtc_state->shared_dpll;
        saved_state->dpll_hw_state = crtc_state->dpll_hw_state;