stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Preserve crtc_state->inherited during state clearing
@ 2023-02-23 15:20 Ville Syrjala
  2023-03-10 11:08 ` [Intel-gfx] " Shankar, Uma
  0 siblings, 1 reply; 2+ messages in thread
From: Ville Syrjala @ 2023-02-23 15:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable, Lee Shawn C

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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>
---
 drivers/gpu/drm/i915/display/intel_display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index a1fbdf32bd21..ed95c0acfaae 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5078,6 +5078,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;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [Intel-gfx] [PATCH] drm/i915: Preserve crtc_state->inherited during state clearing
  2023-02-23 15:20 [PATCH] drm/i915: Preserve crtc_state->inherited during state clearing Ville Syrjala
@ 2023-03-10 11:08 ` Shankar, Uma
  0 siblings, 0 replies; 2+ messages in thread
From: Shankar, Uma @ 2023-03-10 11:08 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx; +Cc: stable



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville Syrjala
> Sent: Thursday, February 23, 2023 8:51 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: stable@vger.kernel.org
> Subject: [Intel-gfx] [PATCH] drm/i915: Preserve crtc_state->inherited during state
> clearing
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> 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.

Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> 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>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index a1fbdf32bd21..ed95c0acfaae 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -5078,6 +5078,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;
> --
> 2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-10 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 15:20 [PATCH] drm/i915: Preserve crtc_state->inherited during state clearing Ville Syrjala
2023-03-10 11:08 ` [Intel-gfx] " Shankar, Uma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).