Commit 2deed761188d7480eb5f7efbfe7aa77f09322ed8
Committed by
Keith Packard
1 parent
3a9627f4fb
Exists in
master
and in
20 other branches
drm/i915: HDMI hot remove notification to audio driver
On HDMI monitor hot remove, clear SDVO_AUDIO_ENABLE accordingly, so that the audio driver will receive hot plug events and take action to refresh its device state and ELD contents. The cleared SDVO_AUDIO_ENABLE bit needs to be restored to prevent losing HDMI audio after DPMS on. CC: Wang Zhenyu <zhenyu.z.wang@intel.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff
drivers/gpu/drm/i915/intel_hdmi.c
... | ... | @@ -269,7 +269,11 @@ |
269 | 269 | struct drm_i915_private *dev_priv = dev->dev_private; |
270 | 270 | struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder); |
271 | 271 | u32 temp; |
272 | + u32 enable_bits = SDVO_ENABLE; | |
272 | 273 | |
274 | + if (intel_hdmi->has_audio) | |
275 | + enable_bits |= SDVO_AUDIO_ENABLE; | |
276 | + | |
273 | 277 | temp = I915_READ(intel_hdmi->sdvox_reg); |
274 | 278 | |
275 | 279 | /* HW workaround, need to toggle enable bit off and on for 12bpc, but |
276 | 280 | |
... | ... | @@ -281,9 +285,9 @@ |
281 | 285 | } |
282 | 286 | |
283 | 287 | if (mode != DRM_MODE_DPMS_ON) { |
284 | - temp &= ~SDVO_ENABLE; | |
288 | + temp &= ~enable_bits; | |
285 | 289 | } else { |
286 | - temp |= SDVO_ENABLE; | |
290 | + temp |= enable_bits; | |
287 | 291 | } |
288 | 292 | |
289 | 293 | I915_WRITE(intel_hdmi->sdvox_reg, temp); |