All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Shankar, Uma" <uma.shankar@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Fix audio ELD handling for DP MST
Date: Thu, 23 Feb 2023 17:07:14 +0200	[thread overview]
Message-ID: <Y/eBIshF4EiSS4rT@intel.com> (raw)
In-Reply-To: <DM4PR11MB636060CF5C30347EF0EBE755F4AA9@DM4PR11MB6360.namprd11.prod.outlook.com>

On Wed, Feb 22, 2023 at 05:59:45PM +0000, Shankar, Uma wrote:
> 
> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville Syrjala
> > Sent: Monday, February 20, 2023 8:48 PM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH 1/2] drm/i915: Fix audio ELD handling for DP MST
> 
> Nit: May be append "display" to drm/i915.

Don't think I've ever used that one. Seems a bit too generic
to provide any real additional information to the table that
wouldn't usually be obvious from the subject anyway.
Do other people find /display useful?

I guess I could have used a more specific /mst in this case,
but then again I already mention MST in the subject anyway
so seems a bit redundant.

> 
> Change looks good to me.
> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> 
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > I forgot to call intel_audio_compute_config() on DP MST, which means ELD doesn't
> > get populated and passed to the audio driver.
> > 
> > References: https://gitlab.freedesktop.org/drm/intel/-/issues/8097
> > Fixes: 5d986635e296 ("drm/i915/audio: Precompute the ELD")
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp_mst.c | 25 +++++++++++++--------
> >  1 file changed, 16 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > index de856f4375fb..a860cbc5dbea 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > @@ -265,6 +265,19 @@ static int intel_dp_mst_update_slots(struct intel_encoder
> > *encoder,
> >  	return 0;
> >  }
> > 
> > +static bool intel_dp_mst_has_audio(const struct drm_connector_state
> > +*conn_state) {
> > +	const struct intel_digital_connector_state *intel_conn_state =
> > +		to_intel_digital_connector_state(conn_state);
> > +	struct intel_connector *connector =
> > +		to_intel_connector(conn_state->connector);
> > +
> > +	if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
> > +		return connector->port->has_audio;
> > +	else
> > +		return intel_conn_state->force_audio == HDMI_AUDIO_ON; }
> > +
> >  static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
> >  				       struct intel_crtc_state *pipe_config,
> >  				       struct drm_connector_state *conn_state) @@ -
> > 272,10 +285,6 @@ static int intel_dp_mst_compute_config(struct intel_encoder
> > *encoder,
> >  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> >  	struct intel_dp_mst_encoder *intel_mst = enc_to_mst(encoder);
> >  	struct intel_dp *intel_dp = &intel_mst->primary->dp;
> > -	struct intel_connector *connector =
> > -		to_intel_connector(conn_state->connector);
> > -	struct intel_digital_connector_state *intel_conn_state =
> > -		to_intel_digital_connector_state(conn_state);
> >  	const struct drm_display_mode *adjusted_mode =
> >  		&pipe_config->hw.adjusted_mode;
> >  	struct link_config_limits limits;
> > @@ -287,11 +296,9 @@ static int intel_dp_mst_compute_config(struct
> > intel_encoder *encoder,
> >  	pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
> >  	pipe_config->has_pch_encoder = false;
> > 
> > -	if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
> > -		pipe_config->has_audio = connector->port->has_audio;
> > -	else
> > -		pipe_config->has_audio =
> > -			intel_conn_state->force_audio == HDMI_AUDIO_ON;
> > +	pipe_config->has_audio =
> > +		intel_dp_mst_has_audio(conn_state) &&
> > +		intel_audio_compute_config(encoder, pipe_config, conn_state);
> > 
> >  	/*
> >  	 * for MST we always configure max link bw - the spec doesn't
> > --
> > 2.39.2
> 

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2023-02-23 15:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 15:17 [Intel-gfx] [PATCH 1/2] drm/i915: Fix audio ELD handling for DP MST Ville Syrjala
2023-02-20 15:17 ` [Intel-gfx] [PATCH 2/2] drm/i915: Drop useless intel_dp_has_audio() argument Ville Syrjala
2023-02-22 18:01   ` Shankar, Uma
2023-02-20 15:57 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915: Fix audio ELD handling for DP MST Patchwork
2023-02-20 16:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-02-20 20:38 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-02-22 17:59 ` [Intel-gfx] [PATCH 1/2] " Shankar, Uma
2023-02-23 15:07   ` Ville Syrjälä [this message]
2023-02-23 17:01     ` Shankar, Uma
2023-02-23 18:04       ` Ville Syrjälä
2023-02-27 12:36         ` Jani Nikula
2023-02-27 13:03           ` Shankar, Uma

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=Y/eBIshF4EiSS4rT@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=uma.shankar@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.