diff options
author | Zhenyu Wang <zhenyuw@linux.intel.com> | 2010-05-11 23:02:14 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-05-26 17:14:52 -0400 |
commit | 467b200da78c56036e58850a7f27902937d506f7 (patch) | |
tree | 91be91afd6df4c96a901c1a2575df376ec2bcc5d | |
parent | 778c35444f7bbb8f1816d40ada650e19c5da9c02 (diff) |
drm/i915: Fix HDMI mode select for Cougarpoint PCH
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>
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 3 | ||||
-rw-r--r-- | 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 df7224de0aed..881fbe9a17f2 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -2744,6 +2744,9 @@ | |||
2744 | #define SDVO_ENCODING (0) | 2744 | #define SDVO_ENCODING (0) |
2745 | #define TMDS_ENCODING (2 << 10) | 2745 | #define TMDS_ENCODING (2 << 10) |
2746 | #define NULL_PACKET_VSYNC_ENABLE (1 << 9) | 2746 | #define NULL_PACKET_VSYNC_ENABLE (1 << 9) |
2747 | /* CPT */ | ||
2748 | #define HDMI_MODE_SELECT (1 << 9) | ||
2749 | #define DVI_MODE_SELECT (0) | ||
2747 | #define SDVOB_BORDER_ENABLE (1 << 7) | 2750 | #define SDVOB_BORDER_ENABLE (1 << 7) |
2748 | #define AUDIO_ENABLE (1 << 6) | 2751 | #define AUDIO_ENABLE (1 << 6) |
2749 | #define VSYNC_ACTIVE_HIGH (1 << 4) | 2752 | #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 65727f0a79a3..83bd764b000e 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, | |||
59 | SDVO_VSYNC_ACTIVE_HIGH | | 59 | SDVO_VSYNC_ACTIVE_HIGH | |
60 | SDVO_HSYNC_ACTIVE_HIGH; | 60 | SDVO_HSYNC_ACTIVE_HIGH; |
61 | 61 | ||
62 | if (hdmi_priv->has_hdmi_sink) | 62 | if (hdmi_priv->has_hdmi_sink) { |
63 | sdvox |= SDVO_AUDIO_ENABLE; | 63 | sdvox |= SDVO_AUDIO_ENABLE; |
64 | if (HAS_PCH_CPT(dev)) | ||
65 | sdvox |= HDMI_MODE_SELECT; | ||
66 | } | ||
64 | 67 | ||
65 | if (intel_crtc->pipe == 1) { | 68 | if (intel_crtc->pipe == 1) { |
66 | if (HAS_PCH_CPT(dev)) | 69 | if (HAS_PCH_CPT(dev)) |