intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix HDMI mode select for Cougarpoint PCH
@ 2010-05-12  3:02 Zhenyu Wang
  2010-05-26 21:15 ` Eric Anholt
  0 siblings, 1 reply; 2+ messages in thread
From: Zhenyu Wang @ 2010-05-12  3:02 UTC (permalink / raw)
  To: eric; +Cc: intel-gfx, fengguang.wu

For real HDMI sink, CPT HDMI port has to set 'HDMI' mode flag
in order to make HDMI audio work correctly.

This is required patch for drm/i915 to enable HDMI audio on CPT PCH,
ALSA patch is at http://mailman.alsa-project.org/pipermail/alsa-devel/2010-May/027601.html

Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h   |    3 +++
 drivers/gpu/drm/i915/intel_hdmi.c |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index f3e39cc..fb8ffbe 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2690,6 +2690,9 @@
 #define  SDVO_ENCODING          (0)
 #define  TMDS_ENCODING          (2 << 10)
 #define  NULL_PACKET_VSYNC_ENABLE       (1 << 9)
+/* CPT */
+#define  HDMI_MODE_SELECT	(1 << 9)
+#define  DVI_MODE_SELECT	(0)
 #define  SDVOB_BORDER_ENABLE    (1 << 7)
 #define  AUDIO_ENABLE           (1 << 6)
 #define  VSYNC_ACTIVE_HIGH      (1 << 4)
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 8a1c4ed..acaca07 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -59,8 +59,11 @@ static void intel_hdmi_mode_set(struct drm_encoder *encoder,
 		SDVO_VSYNC_ACTIVE_HIGH |
 		SDVO_HSYNC_ACTIVE_HIGH;
 
-	if (hdmi_priv->has_hdmi_sink)
+	if (hdmi_priv->has_hdmi_sink) {
 		sdvox |= SDVO_AUDIO_ENABLE;
+		if (HAS_PCH_CPT(dev))
+			sdvox |= HDMI_MODE_SELECT;
+	}
 
 	if (intel_crtc->pipe == 1) {
 		if (HAS_PCH_CPT(dev))
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/i915: Fix HDMI mode select for Cougarpoint PCH
  2010-05-12  3:02 [PATCH] drm/i915: Fix HDMI mode select for Cougarpoint PCH Zhenyu Wang
@ 2010-05-26 21:15 ` Eric Anholt
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Anholt @ 2010-05-26 21:15 UTC (permalink / raw)
  To: Zhenyu Wang; +Cc: intel-gfx, fengguang.wu


[-- Attachment #1.1: Type: text/plain, Size: 496 bytes --]

On Wed, 12 May 2010 11:02:14 +0800, Zhenyu Wang <zhenyuw@linux.intel.com> wrote:
> For real HDMI sink, CPT HDMI port has to set 'HDMI' mode flag
> in order to make HDMI audio work correctly.
> 
> This is required patch for drm/i915 to enable HDMI audio on CPT PCH,
> ALSA patch is at http://mailman.alsa-project.org/pipermail/alsa-devel/2010-May/027601.html
> 
> Tested-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>

Applied. Thanks!

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-26 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-12  3:02 [PATCH] drm/i915: Fix HDMI mode select for Cougarpoint PCH Zhenyu Wang
2010-05-26 21:15 ` Eric Anholt

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).