From: Wu Fengguang <fengguang.wu@intel.com>
To: Keith Packard <keithp@keithp.com>
Cc: Takashi Iwai <tiwai@suse.de>,
Wang Zhenyu <zhenyu.z.wang@intel.com>,
Wu Fengguang <fengguang.wu@intel.com>
Cc: Sander Jansen <s.jansen@gmail.com>,
Christopher White <c.white@pulseforce.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Pierre-louis Bossart " <pierre-louis.bossart@intel.com>,
Jeremy Bush <contractfrombelow@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/5] drm/i915: HDMI hot remove notification to audio driver
Date: Fri, 09 Dec 2011 20:42:20 +0800 [thread overview]
Message-ID: <20111209124556.111025822@intel.com> (raw)
In-Reply-To: 20111209124216.701131933@intel.com
[-- Attachment #1: eld-hot-disable --]
[-- Type: text/plain, Size: 1296 bytes --]
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>
---
drivers/gpu/drm/i915/intel_dp.c | 4 +++-
drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
--- linux.orig/drivers/gpu/drm/i915/intel_hdmi.c 2011-11-24 17:11:38.000000000 +0800
+++ linux/drivers/gpu/drm/i915/intel_hdmi.c 2011-11-24 17:15:03.000000000 +0800
@@ -269,6 +269,10 @@ static void intel_hdmi_dpms(struct drm_e
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
u32 temp;
+ u32 enable_bits = SDVO_ENABLE;
+
+ if (intel_hdmi->has_audio)
+ enable_bits |= SDVO_AUDIO_ENABLE;
temp = I915_READ(intel_hdmi->sdvox_reg);
@@ -281,9 +285,9 @@ static void intel_hdmi_dpms(struct drm_e
}
if (mode != DRM_MODE_DPMS_ON) {
- temp &= ~SDVO_ENABLE;
+ temp &= ~enable_bits;
} else {
- temp |= SDVO_ENABLE;
+ temp |= enable_bits;
}
I915_WRITE(intel_hdmi->sdvox_reg, temp);
next prev parent reply other threads:[~2011-12-09 13:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-09 12:42 [PATCH 0/5] Intel HDMI ELD fixes v2 Wu Fengguang
2011-12-09 12:42 ` [PATCH 1/5] drm/i915: fix ELD writing for SandyBridge Wu Fengguang
2011-12-09 12:42 ` [PATCH 2/5] drm/i915: rename audio ELD registers Wu Fengguang
2011-12-09 12:42 ` [PATCH 3/5] drm/i915: dont trigger hotplug events on unchanged ELD Wu Fengguang
2011-12-09 12:42 ` Wu Fengguang [this message]
2011-12-09 12:42 ` [PATCH 5/5] drm/i915: DisplayPort hot remove notification to audio driver Wu Fengguang
2011-12-09 13:26 ` [PATCH 0/5] Intel HDMI ELD fixes v2 Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111209124556.111025822@intel.com \
--to=fengguang.wu@intel.com \
--cc=keithp@keithp.com \
--cc=tiwai@suse.de \
--cc=zhenyu.z.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox