public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Christopher White <c.white@pulseforce.com>
Cc: Jeremy Bush <contractfrombelow@gmail.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Wang, Zhenyu Z" <zhenyu.z.wang@intel.com>,
	"Bossart, Pierre-louis" <pierre-louis.bossart@intel.com>
Subject: Re: [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver
Date: Wed, 9 Nov 2011 14:59:53 +0800	[thread overview]
Message-ID: <20111109065953.GB28238@localhost> (raw)
In-Reply-To: <4EA9B7A3.6060008@pulseforce.com>

[-- Attachment #1: Type: text/plain, Size: 2574 bytes --]

Hi Christopher,

I don't find anything wrong with the ELD parsing code, however I do
find a bug that prevented ELD from being passed to the audio driver on
SandyBridge.

I just posted the fix. For your convenience, it's attached in this
email too.

Thanks,
Fengguang

On Fri, Oct 28, 2011 at 03:57:23AM +0800, Christopher White wrote:
> There appears to be some issues with the patch? I'm on SandyBridge and 
> using the HD3000's HDMI.
> 
> I've now tried manually merging the ELD patch (both files Wu Fengguang 
> submitted) and compiling Kernel 3.0.4. I've also tried drm-intel-next 
> Kernel 3.1 pre-built from 
> http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/current/ as 
> I knew it was built from keithp's latest drm-intel-next repository.
> 
> Both of these methods had the patch applied, yet neither were able to 
> read the ELD correctly from my Onkyo TX-SR607 receiver.
> 
> If I manually dump the EDID from my receiver and analyze it with Monitor 
> Asset Manager (by EnTech Taiwan), it shows that the ELD contains an 8 
> channel specification up to 192 kHz, and that's what's being exposed 
> over HDMI to the Intel graphics adapter, yet this isn't detected. It 
> just plain isn't being read, and is falling back to the default 2ch 
> 16kHz configuration. It's exactly as it was in the past, before this 
> patch attempt.
> 
> You can see my 256 byte EDID dump, straight from the receiver, over at:
> http://www.pulseforce.com/node/edid.dump
> 
> It shows exactly what the receiver is exposing over HDMI, proving that 
> it's not the device that's at fault.
> 
> Any ideas what's wrong? Here's the HDMI messages from the startup log:
> 
> HDMI status: Pin=7 Presence_Detect=1 ELD_Valid=1
> HDMI: detected monitor  at connection type HDMI
> HDMI: available speakers: FL/FR
> HDMI: supports coding type LPCM: channels = 2, rates = 44100 48000 
> 88200, bits = 16
> HDMI hot plug event: Pin=7 Presence_Detect=1 ELD_Valid=1
> HDMI status: Pin=7 Presence_Detect=1 ELD_Valid=1
> input: HDA Intel PCH HDMI/DP as 
> /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
> HDMI: detected monitor  at connection type HDMI
> HDMI: available speakers: FL/FR
> HDMI: supports coding type LPCM: channels = 2, rates = 44100 48000 
> 88200, bits = 16
> HDMI hot plug event: Pin=7 Presence_Detect=1 ELD_Valid=1
> HDMI status: Pin=7 Presence_Detect=1 ELD_Valid=1
> HDMI: detected monitor  at connection type HDMI
> HDMI: available speakers: FL/FR
> HDMI: supports coding type LPCM: channels = 2, rates = 44100 48000 
> 88200, bits = 16
> 
> 
> 
> Christopher White

[-- Attachment #2: sandybridge-eld-fix --]
[-- Type: text/plain, Size: 1655 bytes --]

Subject: drm/i915: fix ELD writing for SandyBridge
Date: Wed Nov 09 13:17:14 CST 2011

SandyBridge should be using the same register addresses as IvyBridge.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h      |    6 +++---
 drivers/gpu/drm/i915/intel_display.c |   10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

--- linux.orig/drivers/gpu/drm/i915/i915_reg.h	2011-11-09 13:17:19.000000000 +0800
+++ linux/drivers/gpu/drm/i915/i915_reg.h	2011-11-09 13:18:39.000000000 +0800
@@ -3543,8 +3543,8 @@
 #define GEN5_ELD_VALIDB			(1 << 0)
 #define GEN5_CP_READYB			(1 << 1)
 
-#define GEN7_HDMIW_HDMIEDID_A		0xE5050
-#define GEN7_AUD_CNTRL_ST_A		0xE50B4
-#define GEN7_AUD_CNTRL_ST2		0xE50C0
+#define GEN6_HDMIW_HDMIEDID_A		0xE5050
+#define GEN6_AUD_CNTL_ST_A		0xE50B4
+#define GEN6_AUD_CNTRL_ST2		0xE50C0
 
 #endif /* _I915_REG_H_ */
--- linux.orig/drivers/gpu/drm/i915/intel_display.c	2011-11-09 13:19:28.000000000 +0800
+++ linux/drivers/gpu/drm/i915/intel_display.c	2011-11-09 13:20:02.000000000 +0800
@@ -5857,14 +5857,14 @@ static void ironlake_write_eld(struct dr
 	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 {
+	if (IS_GEN5(connector->dev)) {
 		hdmiw_hdmiedid = GEN5_HDMIW_HDMIEDID_A;
 		aud_cntl_st = GEN5_AUD_CNTL_ST_A;
 		aud_cntrl_st2 = GEN5_AUD_CNTL_ST2;
+	} else {
+		hdmiw_hdmiedid = GEN6_HDMIW_HDMIEDID_A;
+		aud_cntl_st = GEN6_AUD_CNTL_ST_A;
+		aud_cntrl_st2 = GEN6_AUD_CNTRL_ST2;
 	}
 
 	i = to_intel_crtc(crtc)->pipe;

[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

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

  reply	other threads:[~2011-11-09  6:59 UTC|newest]

Thread overview: 66+ 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
2011-09-05 11:04       ` Chris Wilson
2011-09-05 12:31         ` Wu Fengguang
     [not found]           ` <4E64C41B.5090309@pulseforce.com>
     [not found]             ` <20110905124730.GB794@localhost>
     [not found]               ` <4EA82DBD.9020301@pulseforce.com>
2011-10-27 19:57                 ` Christopher White
2011-11-09  6:59                   ` Wu Fengguang [this message]
2011-11-09  9:00                     ` Christopher White
2011-11-09  9:30                       ` Christopher White
2011-11-09 13:01                         ` Wu Fengguang
     [not found]                 ` <4EA9B6EF.9040305@pulseforce.com>
2011-11-01 11:36                   ` Wu Fengguang
2011-11-01 17:00                     ` Christopher White
2011-11-02  1:45                       ` Wu Fengguang
2011-11-02  6:10                         ` Sander Jansen
2011-11-02  7:35                           ` Paul Menzel
2011-11-02 11:17                             ` Sander Jansen
2011-11-02 14:26                               ` Sander Jansen
2011-11-02  8:52                           ` Wu Fengguang
2011-11-02 17:41                             ` Keith Packard
2011-11-04  0:21                         ` Tony Olivo
2011-11-05  0:20                         ` Christopher White
2011-11-09 13:12                           ` Wu Fengguang
2011-11-10  2:25                             ` Christopher White
2011-11-10  3:27                               ` Wu Fengguang
2011-11-10  4:10                                 ` Christopher White
2011-11-10  7:06                                   ` Wu Fengguang
2011-11-10  7:33                                   ` Wu Fengguang
2011-11-10  7:55                                     ` Wu Fengguang
2011-11-10  8:50                                       ` Wu Fengguang
2011-11-10  8:55                                       ` Christopher White
2011-11-10 11:00                                         ` Christopher White
2011-11-10 11:22                                           ` Takashi Iwai
2011-11-10 11:50                                             ` Christopher White
2011-11-10 11:53                                               ` Takashi Iwai
2011-11-10 12:39                                                 ` Christopher White
2011-11-10 13:01                                                   ` Takashi Iwai
2011-11-10 12:56                                               ` Wu Fengguang
2011-11-10 13:01                                                 ` Christopher White
2011-11-10 13:17                                                   ` Wu Fengguang
2011-11-10 13:34                                                     ` Christopher White
2011-11-10 13:47                                                       ` Wu Fengguang
2011-11-10 14:12                                                         ` Wu Fengguang
2011-11-10 13:41                                                     ` Takashi Iwai
2011-11-10 13:51                                                       ` Wu Fengguang
2011-11-10 13:53                                                         ` Wu Fengguang
2011-11-10 14:28                                                         ` Takashi Iwai
2011-11-11  2:29                                                           ` Wu Fengguang
2011-11-11  7:40                                                             ` Takashi Iwai
2011-11-11  8:22                                                               ` Wu Fengguang
2011-11-11  8:49                                                                 ` Takashi Iwai
2011-11-11  9:24                                                                   ` Wu Fengguang
2011-11-11 10:17                                                                     ` Takashi Iwai
2011-11-11 11:12                                                                       ` Wu Fengguang
2011-11-11 11:23                                                                         ` Takashi Iwai
2011-11-11 11:32                                                                           ` Wu Fengguang
2011-11-12  2:27                                                                   ` Wu Fengguang
2011-11-14  9:45                                                                     ` Takashi Iwai
2011-11-14 13:25                                                                       ` Wu Fengguang
2011-11-15 17:18                                                                         ` Purushothaman, Vijay A
2011-11-10  6:59                               ` 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=20111109065953.GB28238@localhost \
    --to=fengguang.wu@intel.com \
    --cc=c.white@pulseforce.com \
    --cc=contractfrombelow@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --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