aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_hdmi.c
diff options
context:
space:
mode:
authorWang Xingchao <xingchao.wang@intel.com>2012-09-12 23:19:00 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-09-20 08:23:10 -0400
commit3cce574f0190dd149472059fb69267cf83d290f9 (patch)
tree48da688d56cadf28981cf4f62c31cd3f4b541b4a /drivers/gpu/drm/i915/intel_hdmi.c
parent2f745ad3d3ce96cb72d3981570d9e9988442bce8 (diff)
drm/i915: HDMI - Clear Audio Enable bit for Hot Plug unconditionally
Clear Audio Enable bit to trigger unsolicated event to notify Audio Driver part the HDMI hot plug change. The patch fixed the bug when remove HDMI cable the bit was not cleared correctly. In intel_enable_hdmi(), if intel_hdmi->has_audio been true, the "Audio enable bit" will be set to trigger unsolicated event to notify Alsa driver the change. intel_hdmi->has_audio will be reset to false from intel_hdmi_detect() after remove the hdmi cable, here's debug log: [ 187.494153] [drm:output_poll_execute], [CONNECTOR:17:HDMI-A-1] status updated from 1 to 2 [ 187.525349] [drm:intel_hdmi_detect], HDMI: has_audio = 0 so when comes back to intel_disable_hdmi(), the "Audio enable bit" will not be cleared. And this cause the eld infomation and pin presence doesnot update accordingly in alsa driver side. This patch will also trigger unsolicated event to alsa driver to notify the hot plug event: [ 187.853159] ALSA sound/pci/hda/patch_hdmi.c:772 HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=1 [ 187.853268] ALSA sound/pci/hda/patch_hdmi.c:990 HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0 Signed-off-by: Wang Xingchao <xingchao.wang@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_hdmi.c')
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 5d02aad0de8e..229897ff75da 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -674,10 +674,7 @@ static void intel_disable_hdmi(struct intel_encoder *encoder)
674 struct drm_i915_private *dev_priv = dev->dev_private; 674 struct drm_i915_private *dev_priv = dev->dev_private;
675 struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); 675 struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
676 u32 temp; 676 u32 temp;
677 u32 enable_bits = SDVO_ENABLE; 677 u32 enable_bits = SDVO_ENABLE | SDVO_AUDIO_ENABLE;
678
679 if (intel_hdmi->has_audio)
680 enable_bits |= SDVO_AUDIO_ENABLE;
681 678
682 temp = I915_READ(intel_hdmi->sdvox_reg); 679 temp = I915_READ(intel_hdmi->sdvox_reg);
683 680