diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2017-01-31 14:16:49 -0600 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-01 16:21:49 +0100 |
commit | d5d8c3a19e43ca588555d88e1d43a00aeacd0e56 (patch) | |
tree | c54fe17c6d156efc1ee322de5b35ea03494aef65 /drivers/gpu/drm/i915/intel_lpe_audio.c | |
parent | b5f2be9ae5bf88f5751cc9f5813ed28e7f87402d (diff) | |
download | linux-stable-d5d8c3a19e43ca588555d88e1d43a00aeacd0e56.tar.gz linux-stable-d5d8c3a19e43ca588555d88e1d43a00aeacd0e56.tar.bz2 linux-stable-d5d8c3a19e43ca588555d88e1d43a00aeacd0e56.zip |
drm/i915: add DisplayPort amp unmute for LPE audio mode
Enable unmute/mute amp notification. This doesn't seem to affect
HDMI support so this is done unconditionally.
An earlier version of this patch set a chicken bit at address 0x62F38
prior to the mute/unmute but this register doesn't seem to do anything
so this phase was removed.
v1->v2: Drop needless pipe A check, avoid temporary reg offset variable.
v2->v3: Add "_" prefix to VLV_AUD_PORT_EN_X_DBG as they are internal.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lpe_audio.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lpe_audio.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lpe_audio.c b/drivers/gpu/drm/i915/intel_lpe_audio.c index 245523e14418..5da14f40f94a 100644 --- a/drivers/gpu/drm/i915/intel_lpe_audio.c +++ b/drivers/gpu/drm/i915/intel_lpe_audio.c @@ -337,6 +337,7 @@ void intel_lpe_audio_notify(struct drm_i915_private *dev_priv, { unsigned long irq_flags; struct intel_hdmi_lpe_audio_pdata *pdata = NULL; + u32 audio_enable; if (!HAS_LPE_AUDIO(dev_priv)) return; @@ -346,6 +347,8 @@ void intel_lpe_audio_notify(struct drm_i915_private *dev_priv, spin_lock_irqsave(&pdata->lpe_audio_slock, irq_flags); + audio_enable = I915_READ(VLV_AUD_PORT_EN_DBG(port)); + if (eld != NULL) { memcpy(pdata->eld.eld_data, eld, HDMI_MAX_ELD_BYTES); @@ -357,11 +360,20 @@ void intel_lpe_audio_notify(struct drm_i915_private *dev_priv, pdata->tmds_clock_speed = tmds_clk_speed; if (link_rate) pdata->link_rate = link_rate; + + /* Unmute the amp for both DP and HDMI */ + I915_WRITE(VLV_AUD_PORT_EN_DBG(port), + audio_enable & ~VLV_AMP_MUTE); + } else { memset(pdata->eld.eld_data, 0, HDMI_MAX_ELD_BYTES); pdata->hdmi_connected = false; pdata->dp_output = false; + + /* Mute the amp for both DP and HDMI */ + I915_WRITE(VLV_AUD_PORT_EN_DBG(port), + audio_enable | VLV_AMP_MUTE); } if (pdata->notify_audio_lpe) |