From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH] drm/i915: DisplayPort hot remove notification to audio driver Date: Fri, 9 Dec 2011 17:03:43 +0800 Message-ID: <20111209090343.GA2320@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B2889E70A for ; Fri, 9 Dec 2011 01:03:45 -0800 (PST) Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Keith Packard Cc: Takashi Iwai , "intel-gfx@lists.freedesktop.org" , LKML , "Wang, Zhenyu Z" List-Id: intel-gfx@lists.freedesktop.org On DP monitor hot remove, clear DP_AUDIO_OUTPUT_ENABLE accordingly, so that the audio driver will receive hot plug events and take action to refresh its device state and ELD contents. Note that the DP_AUDIO_OUTPUT_ENABLE bit may be enabled or disabled only when the link training is complete and set to "Normal". Signed-off-by: Wu Fengguang --- drivers/gpu/drm/i915/intel_dp.c | 1 + 1 file changed, 1 insertion(+) This works both on KMS console and gnome desktop. Hot plug/unplug and DPMS on/off are all tested OK. --- linux.orig/drivers/gpu/drm/i915/intel_dp.c 2011-12-09 16:51:21.000000000 +0800 +++ linux/drivers/gpu/drm/i915/intel_dp.c 2011-12-09 16:59:45.000000000 +0800 @@ -1771,6 +1771,7 @@ intel_dp_link_down(struct intel_dp *inte intel_wait_for_vblank(dev, to_intel_crtc(crtc)->pipe); } + DP &= ~DP_AUDIO_OUTPUT_ENABLE; I915_WRITE(intel_dp->output_reg, DP & ~DP_PORT_EN); POSTING_READ(intel_dp->output_reg); msleep(intel_dp->panel_power_down_delay);