intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: tiwai@suse.de, intel-gfx@lists.freedesktop.org,
	dhinakaran.pandiyan@intel.com, jeeja.kp@intel.com,
	daniel.vetter@intel.com
Subject: Re: [PATCH 2/2] drm/i915/audio: Extend audio sync rate support for DP MST
Date: Tue, 29 Nov 2016 18:50:00 +0200	[thread overview]
Message-ID: <20161129165000.GT31595@intel.com> (raw)
In-Reply-To: <87zikis0sx.fsf@intel.com>

On Tue, Nov 29, 2016 at 06:33:50PM +0200, Jani Nikula wrote:
> On Tue, 15 Nov 2016, libin.yang@intel.com wrote:
> > From: Libin Yang <libin.yang@intel.com>
> >
> > This patch extends the support of audio sample rate
> > sync up to DP MST.
> >
> > Signed-off-by: Libin Yang <libin.yang@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_audio.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> > index c8a1345..88ed869 100644
> > --- a/drivers/gpu/drm/i915/intel_audio.c
> > +++ b/drivers/gpu/drm/i915/intel_audio.c
> > @@ -807,7 +807,8 @@ static int i915_audio_component_sync_audio_rate(struct device *kdev, int port,
> >  	intel_encoder = get_saved_enc(dev_priv, port, pipe);
> >  	if (!intel_encoder || !intel_encoder->base.crtc ||
> >  	    (intel_encoder->type != INTEL_OUTPUT_HDMI &&
> > -	     intel_encoder->type != INTEL_OUTPUT_DP)) {
> > +	     intel_encoder->type != INTEL_OUTPUT_DP &&
> > +		 intel_encoder->type != INTEL_OUTPUT_DP_MST)) {
> 
> I think the better option is to make absolutely sure we never store
> other kinds of encoders in dev_priv->av_enc_map[pipe] to begin with. I
> think that's true already, but please add
> 
> 	if (WARN_ON(intel_encoder->type != INTEL_OUTPUT_HDMI &&
> 		    intel_encoder->type != INTEL_OUTPUT_DP &&
> 		    intel_encoder->type != INTEL_OUTPUT_DP_MST))
>         	return;
> 
> near the beginning of intel_audio_codec_enable(), and remove the type
> checks here. This reduces the confusion about different kinds of checks
> after calling get_saved_enc().

This while encoder->type thing is pretty broken actually. Currently
we're semi-randomly flipping DDI encoders between UNKNOWN,HDMI and DP.
I want to eliminate that so that their type will always be just "DDI".
For iguring out what kind of signal we are driving out you should be
looking at crtc_state->output_types.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-11-29 16:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15  7:04 [PATCH 1/2] drm/i915/audio: extend get_saved_enc() to support more scenarios libin.yang
2016-11-15  7:04 ` [PATCH 2/2] drm/i915/audio: Extend audio sync rate support for DP MST libin.yang
2016-11-29 16:33   ` Jani Nikula
2016-11-29 16:50     ` Ville Syrjälä [this message]
2016-11-30  8:18       ` Yang, Libin
2016-11-30  8:10     ` Yang, Libin
2016-11-30 15:51       ` Jani Nikula
2016-12-01  1:35         ` Yang, Libin
2016-11-15  7:47 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/audio: extend get_saved_enc() to support more scenarios Patchwork
2016-11-25 14:45 ` [PATCH 1/2] " Jani Nikula
2016-11-29  5:45   ` Yang, Libin
2016-11-29 16:35     ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2016-12-01  5:17 libin.yang
2016-12-01  5:17 ` [PATCH 2/2] drm/i915/audio: extend audio sync rate support for DP MST libin.yang
2016-12-02  6:47   ` Yang, Libin
2016-12-02 14:25     ` Jani Nikula
2016-12-03 13:22       ` Yang, Libin

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=20161129165000.GT31595@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jeeja.kp@intel.com \
    --cc=tiwai@suse.de \
    /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 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).