[Intel-gfx] [PATCH] drm/i915/display: Trigger Modeset at boot for audio codec init

Khor, Swee Aun swee.aun.khor at intel.com
Fri Mar 20 16:54:42 UTC 2020


Hi Ville,
You means this change right? Sure. Will try your suggestion as well. 
By the way, what is different between hw.mode and uapi.mode and how we know which to be used? It used to only base.mode before hw/uapi split patches. 

> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -14671,8 +14671,8 @@ static int intel_atomic_check(struct drm_device *dev,
>         /* Catch I915_MODE_FLAG_INHERITED */
>         for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
>                                             new_crtc_state, i) {
> -               if (new_crtc_state->hw.mode.private_flags !=
> -                   old_crtc_state->hw.mode.private_flags)
> +               if (new_crtc_state->uapi.mode.private_flags !=
> +                   old_crtc_state->uapi.mode.private_flags)
>                         new_crtc_state->uapi.mode_changed = true;
>         }
> 
> ?

Regards,
SweeAun

-----Original Message-----
From: Ville Syrjälä <ville.syrjala at linux.intel.com> 
Sent: Friday, March 20, 2020 11:24 PM
To: Shankar, Uma <uma.shankar at intel.com>
Cc: Souza, Jose <jose.souza at intel.com>; intel-gfx at lists.freedesktop.org; Khor, Swee Aun <swee.aun.khor at intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Trigger Modeset at boot for audio codec init

On Fri, Mar 20, 2020 at 06:19:37AM +0000, Shankar, Uma wrote:
> 
> 
> > -----Original Message-----
> > From: Souza, Jose <jose.souza at intel.com>
> > Sent: Friday, March 20, 2020 12:36 AM
> > To: Shankar, Uma <uma.shankar at intel.com>; 
> > intel-gfx at lists.freedesktop.org
> > Cc: Khor, Swee Aun <swee.aun.khor at intel.com>
> > Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Trigger Modeset 
> > at boot for audio codec init
> > 
> > On Wed, 2020-03-18 at 17:00 +0530, Uma Shankar wrote:
> > > If external monitors are connected during boot up, driver uses the 
> > > same mode programmed by BIOS and avoids a full modeset.
> > > This results in display audio codec left uninitialized and display 
> > > audio fails to work till user triggers a modeset.
> > >
> > > This patch fixes the same by triggering a modeset at boot.
> > 
> > We had the same issue for PSR, take a look to the fix:
> > commit 33e059a2e4df454359f642f2235af39de9d3e914
> > drm/i915/psr: Force PSR probe only after full initialization
> > 
> > Maybe make this even more generic.
> 
> Yeah this looks to dealing with almost a similar need. Thanks for 
> pointing this out, will try to come up with a generalized solution.

How about just fixing the uapi vs. hw fail I showed instead of adding even more hacks?

--
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list