Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
To: "tiwai@suse.de" <tiwai@suse.de>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"libin.yang@linux.intel.com" <libin.yang@linux.intel.com>
Subject: Re: [PATCH] drm/i915/dp: DP audio API changes for MST
Date: Wed, 3 Aug 2016 18:52:48 +0000	[thread overview]
Message-ID: <1470251217.6362.3.camel@dk-H97M-D3H> (raw)
In-Reply-To: <s5h37mmt0v2.wl-tiwai@suse.de>

On Wed, 2016-08-03 at 15:53 +0200, Takashi Iwai wrote:
> On Wed, 03 Aug 2016 04:14:30 +0200,
> Dhinakaran Pandiyan wrote:
> > 
> > DP MST provides the capability to send multiple video and audio streams via
> > one single port. This requires the API's between i915 and audio drivers to
> > distinguish between audio capable displays connected to a port. This patch
> > adds this support via an additional parameter 'int dev_id'. The existing
> > parameter 'port' does not change it's meaning.
> > 
> > dev_id =
> > 	MST	: pipe that the stream originates from
> > 	Non-MST	: -1
> > 
> > Affected APIs:
> > struct i915_audio_component_ops
> > -       int (*sync_audio_rate)(struct device *, int port, int rate);
> > +	int (*sync_audio_rate)(struct device *, int port, int dev_id,
> > +	     int rate);
> > 
> > -       int (*get_eld)(struct device *, int port, bool *enabled,
> > -                       unsigned char *buf, int max_bytes);
> > +       int (*get_eld)(struct device *, int port, int dev_id,
> > +		       bool *enabled, unsigned char *buf, int max_bytes);
> > 
> > struct i915_audio_component_audio_ops
> > -       void (*pin_eld_notify)(void *audio_ptr, int port);
> > +       void (*pin_eld_notify)(void *audio_ptr, int port, int dev_id);
> > 
> > This patch makes dummy changes in the audio drivers for build to succeed.
> 
> OK, so the explicit dev_id will be passed in future change in the
> audio side, right?  It'd be good to write up the grand plan.
> 
Yes, that's right. I will explain that and copy the cover-letter text
here.

> 
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.h    |  2 +-
> >  drivers/gpu/drm/i915/intel_audio.c | 82 +++++++++++++++++++++++++++++---------
> >  include/drm/i915_component.h       |  6 +--
> >  include/sound/hda_i915.h           | 11 ++---
> >  sound/hda/hdac_i915.c              |  9 +++--
> >  sound/pci/hda/patch_hdmi.c         |  7 ++--
> >  6 files changed, 82 insertions(+), 35 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 65ada5d..8e4c8c8 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -2054,7 +2054,7 @@ struct drm_i915_private {
> >  	/* perform PHY state sanity checks? */
> >  	bool chv_phy_assert[2];
> >  
> > -	struct intel_encoder *dig_port_map[I915_MAX_PORTS];
> > +	struct intel_encoder *av_enc_map[I915_MAX_PIPES];
> 
> Better to have a comment for this field.
Will add one.
> 
> 
> > -static int i915_audio_component_sync_audio_rate(struct device *dev,
> > -						int port, int rate)
> > +static struct intel_encoder *get_saved_encoder(struct intel_encoder *av_enc_map[],
> > +					       int port, int dev_id)
> > +{
> > +
> > +	enum pipe pipe;
> > +	struct drm_encoder *encoder;
> > +
> > +	if (dev_id >= 0 && dev_id < I915_MAX_PIPES)
> > +		return av_enc_map[dev_id];
> 
> Actually dev_id >= I915_MAX_PIPES is an invalid call, and worth to
> catch with WARN_ON() and bail out.
Sure, thanks for the review.
> 
> thanks,
> 
> Takashi
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-08-03 18:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  2:14 DP audio API changes for identifying displays connected to a port Dhinakaran Pandiyan
2016-08-03  2:14 ` [PATCH] drm/i915/dp: DP audio API changes for MST Dhinakaran Pandiyan
2016-08-03 13:53   ` Takashi Iwai
2016-08-03 18:52     ` Pandiyan, Dhinakaran [this message]
2016-08-03 19:08   ` Ville Syrjälä
2016-08-03 19:43     ` Pandiyan, Dhinakaran
2016-08-03 20:28       ` Ville Syrjälä
2016-08-03 21:42         ` Pandiyan, Dhinakaran
2016-08-04 12:49           ` Ville Syrjälä
2016-08-04 16:44             ` Pandiyan, Dhinakaran
2016-08-04 17:18     ` Jim Bride
2016-08-04 17:35       ` Ville Syrjälä
2016-08-04 17:55         ` Takashi Iwai
2016-08-04 20:48           ` Ville Syrjälä
2016-08-05  2:31             ` Yang, Libin
2016-08-05  7:46               ` Pandiyan, Dhinakaran
2016-08-05  8:51                 ` Ville Syrjälä
2016-08-05  2:35   ` Yang, Libin
2016-08-05  5:57     ` Pandiyan, Dhinakaran
2016-08-05  6:21       ` Yang, Libin
2016-08-05  6:41         ` Pandiyan, Dhinakaran
2016-08-05  6:43           ` Yang, Libin
2016-08-03  6:25 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-03 13:47 ` DP audio API changes for identifying displays connected to a port Takashi Iwai

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=1470251217.6362.3.camel@dk-H97M-D3H \
    --to=dhinakaran.pandiyan@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=libin.yang@linux.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