All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Khor, Swee Aun" <swee.aun.khor@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Shankar, Uma" <uma.shankar@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Trigger Modeset at boot for audio codec init
Date: Mon, 23 Mar 2020 14:29:25 +0000	[thread overview]
Message-ID: <SN6PR11MB3134E738523673EE95DFEE33AFF00@SN6PR11MB3134.namprd11.prod.outlook.com> (raw)
In-Reply-To: <SN6PR11MB313483A95ADC942C6ADB4A23AFF50@SN6PR11MB3134.namprd11.prod.outlook.com>

Hi Ville, 

You are right, your suggestion will fix this issue.

#Based on dmesg log, uapi mode private flags change is captured
...
[   11.404578] fbcon: i915drmfb (fb0) is primary device
[   11.404743] [drm] SA: intel_atomic_check: uapi change 
[   11.404744] [drm] SA2: intel_atomic_check: new_crtc_state->uapi.mode.private_flags= 0, old_crtc_state->uapi.mode.private_flags= 1  
[   11.404744] [drm] SA2: intel_atomic_check: new_crtc_state->uapi.mode.private_flags= 0, old_crtc_state->uapi.mode.private_flags= 0  
[   11.404745] [drm] SA2: intel_atomic_check: new_crtc_state->uapi.mode.private_flags= 0, old_crtc_state->uapi.mode.private_flags= 0  
[   11.404799] [drm:intel_atomic_check [i915]] [CONNECTOR:110:HDMI-A-2] Limiting display bpp to 24 instead of EDID bpp 24, requested bpp 36, max platform bpp 36
[   11.404855] [drm:intel_hdmi_compute_config [i915]] picking 8 bpc for HDMI output (pipe bpp: 24)
[   11.404898] [drm:intel_atomic_check [i915]] hw max bpp: 24, pipe bpp: 24, dithering: 0
...

#Here is the git diff 
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 4d1634ed6a1b..b5c56cd513d9 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -14108,11 +14108,15 @@ static int intel_atomic_check(struct drm_device *dev,
 	int ret, i;
 	bool any_ms = false;
 
+	DRM_INFO("SA: intel_atomic_check: uapi change \n");
+
 	/* 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)
+
+		DRM_INFO("SA2: intel_atomic_check: new_crtc_state->uapi.mode.private_flags= %d, old_crtc_state->uapi.mode.private_flags= %d  \n", new_crtc_state->uapi.mode.private_flags, old_crtc_state->uapi.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: Khor, Swee Aun 
Sent: Saturday, March 21, 2020 12:55 AM
To: Ville Syrjälä <ville.syrjala@linux.intel.com>; Shankar, Uma <uma.shankar@intel.com>
Cc: Souza, Jose <jose.souza@intel.com>; intel-gfx@lists.freedesktop.org
Subject: RE: [Intel-gfx] [PATCH] drm/i915/display: Trigger Modeset at boot for audio codec init

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@linux.intel.com>
Sent: Friday, March 20, 2020 11:24 PM
To: Shankar, Uma <uma.shankar@intel.com>
Cc: Souza, Jose <jose.souza@intel.com>; intel-gfx@lists.freedesktop.org; Khor, Swee Aun <swee.aun.khor@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@intel.com>
> > Sent: Friday, March 20, 2020 12:36 AM
> > To: Shankar, Uma <uma.shankar@intel.com>; 
> > intel-gfx@lists.freedesktop.org
> > Cc: Khor, Swee Aun <swee.aun.khor@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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-03-23 14:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18 11:30 [Intel-gfx] [PATCH] drm/i915/display: Trigger Modeset at boot for audio codec init Uma Shankar
2020-03-18 12:07 ` Anshuman Gupta
2020-03-18 14:02   ` Shankar, Uma
2020-03-18 12:15 ` Maarten Lankhorst
2020-03-18 14:37   ` Shankar, Uma
2020-03-19 12:11     ` Maarten Lankhorst
2020-03-18 12:23 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2020-03-19 19:05 ` [Intel-gfx] [PATCH] " Souza, Jose
2020-03-20  6:19   ` Shankar, Uma
2020-03-20 15:24     ` Ville Syrjälä
2020-03-20 16:54       ` Khor, Swee Aun
2020-03-23 14:29         ` Khor, Swee Aun [this message]
2020-03-24  5:56           ` Khor, Swee Aun
2020-03-26  7:25             ` Shankar, Uma
2020-03-24 18:38     ` Kai Vehmanen
2020-03-23 16:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: Trigger Modeset at boot for audio codec init (rev2) Patchwork
2020-03-23 17:20 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-24  0:01 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-03-24  6:11 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/display: Trigger Modeset at boot for audio codec init (rev3) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR11MB3134E738523673EE95DFEE33AFF00@SN6PR11MB3134.namprd11.prod.outlook.com \
    --to=swee.aun.khor@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=uma.shankar@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.