From: Wu Fengguang <fengguang.wu@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Keith Packard <keithp@keithp.com>,
"Wang, Zhenyu Z" <zhenyu.z.wang@intel.com>,
"intel-gfx@lists.freedesktop..."
<intel-gfx@lists.freedesktop.org>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Ben Skeggs <bskeggs@redhat.com>,
Jeremy Bush <contractfrombelow@gmail.com>,
Christopher White <c.white@pulseforce.com>,
"Fu, Michael" <michael.fu@intel.com>,
"Bossart, Pierre-louis" <pierre-louis.bossart@intel.com>
Subject: Re: [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver
Date: Mon, 5 Sep 2011 09:14:00 +0800 [thread overview]
Message-ID: <20110905011400.GB24561@localhost> (raw)
In-Reply-To: <aefc95$1b1bat@orsmga001.jf.intel.com>
On Sun, Sep 04, 2011 at 08:08:37PM +0800, Chris Wilson wrote:
> On Sun, 4 Sep 2011 05:15:10 +0800, Wu Fengguang <fengguang.wu@intel.com> wrote:
> > Changes from v4: remove a debug call to dump_stack().
> > Thanks to Bossart for catching this!
> > ---
> >
> > Add ELD support for Intel Eaglelake, IbexPeak/Ironlake,
> > SandyBridge/CougarPoint and IvyBridge/PantherPoint chips.
> >
> > ELD (EDID-Like Data) describes to the HDMI/DP audio driver the audio
> > capabilities of the plugged monitor. It's built and passed to audio
> > driver in 2 steps:
> >
> > (1) at get_modes time, parse EDID and save ELD to drm_connector.eld[]
> >
> > (2) at mode_set time, write drm_connector.eld[] to the Transcoder's hw
> > ELD buffer and set the ELD_valid bit to inform HDMI/DP audio driver
> >
> > ELD selection policy: it's possible for one encoder to be associated
> > with multiple connectors (ie. monitors), in which case the first found
> > ELD will be used. This policy may not be suitable for all users, but
> > let's start it simple first.
> >
> > The impact of ELD selection policy: assume there are two monitors, one
> > supports stereo playback and the other has 8-channel output; cloned
> > display mode is used, so that the two monitors are associated with the
> > same internal encoder. If only the stereo playback capability is reported,
> > the user won't be able to start 8-channel playback; if the 8-channel ELD
> > is reported, then user space applications may send 8-channel samples
> > down, however the user may actually be listening to the 2-channel
> > monitor and not connecting speakers to the 8-channel monitor. Overall,
> > it's more safe to report maximum profiles to the user space, so that
> > the user can at least be able to do 8-channel playback if he want to.
> >
> > This patch is tested OK on G45/HDMI, IbexPeak/HDMI and IvyBridge/HDMI+DP.
> >
> > Minor imperfection: the GEN6_AUD_CNTL_ST/DIP_Port_Select field always
> > reads 0 (reserved). Without knowing the port number, I worked it around
> > by setting the ELD_valid bit for ALL the three ports. It's tested to not
> > be a problem, because the audio driver will find invalid ELD data and
> > hence rightfully abort, even when it sees the ELD_valid indicator.
> >
>
> > --- linux-next.orig/drivers/gpu/drm/i915/intel_display.c 2011-09-02 15:59:31.000000000 +0800
> > +++ linux-next/drivers/gpu/drm/i915/intel_display.c 2011-09-04 05:11:44.000000000 +0800
> > +static void ironlake_write_eld(struct drm_connector *connector,
> > + struct drm_crtc *crtc)
> > +{
> > + struct drm_i915_private *dev_priv = connector->dev->dev_private;
> > + uint8_t *eld = connector->eld;
> > + uint32_t eldv;
> > + uint32_t i;
> > + int len;
> > + int hdmiw_hdmiedid;
> > + int aud_cntl_st;
> > + int aud_cntrl_st2;
> > +
> > + if (IS_IVYBRIDGE(connector->dev)) {
> > + hdmiw_hdmiedid = GEN7_HDMIW_HDMIEDID_A;
> > + aud_cntl_st = GEN7_AUD_CNTRL_ST_A;
> > + aud_cntrl_st2 = GEN7_AUD_CNTRL_ST2;
> > + } else {
> > + hdmiw_hdmiedid = GEN6_HDMIW_HDMIEDID_A;
> > + aud_cntl_st = GEN6_AUD_CNTL_ST_A;
> > + aud_cntrl_st2 = GEN6_AUD_CNTL_ST2;
> > + }
>
> This register naming is inconsistent with its intent. If these registers
> were indeed introduced on Ironlake as you seem to imply by using them
> with Ironlake, you should label them as GEN5 and not GEN6.
Yeah, I admit that I'm a bit confused in choosing the exact names.
I'll fix that.
> This patch should be split between adding the core drm functionality to
> build the ELD and the introduction of i915 support.
OK. I didn't do this because I was not sure if it's OK to just add the
drm_*() functions without any code to call them..
Thanks,
Fengguang
next prev parent reply other threads:[~2011-09-05 1:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 8:14 [PATCH v4] drm/i915: pass ELD to HDMI/DP audio driver Wu Fengguang
2011-09-02 8:29 ` Wu Fengguang
2011-09-03 21:15 ` [PATCH v5] " Wu Fengguang
2011-09-04 10:57 ` James Cloos
2011-09-05 1:19 ` Wu Fengguang
2011-09-04 11:11 ` [Intel-gfx] " Paul Menzel
2011-09-05 1:06 ` Wu Fengguang
2011-09-04 12:08 ` Chris Wilson
2011-09-05 1:14 ` Wu Fengguang [this message]
2011-09-05 11:04 ` Chris Wilson
2011-09-05 12:31 ` Wu Fengguang
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=20110905011400.GB24561@localhost \
--to=fengguang.wu@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bskeggs@redhat.com \
--cc=c.white@pulseforce.com \
--cc=chris@chris-wilson.co.uk \
--cc=contractfrombelow@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=keithp@keithp.com \
--cc=michael.fu@intel.com \
--cc=pierre-louis.bossart@intel.com \
--cc=zhenyu.z.wang@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 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).