FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 09-26-2012, 10:24 AM
Rex Tsai
 
Default drm/i915: HDMI - Clear Audio Enable bit for Hot Plug unconditionally

From: Wang Xingchao <xingchao.wang@intel.com>

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] [drmutput_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: Rex Tsai <rex.tsai@canonical.com>
---
drivers/gpu/drm/i915/intel_hdmi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 9cd81ba..427ec8c 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -269,10 +269,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode)
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;
+ u32 enable_bits = SDVO_ENABLE | SDVO_AUDIO_ENABLE;

temp = I915_READ(intel_hdmi->sdvox_reg);

--
1.7.9.5


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 09-26-2012, 12:55 PM
Herton Ronaldo Krzesinski
 
Default drm/i915: HDMI - Clear Audio Enable bit for Hot Plug unconditionally

On Wed, Sep 26, 2012 at 06:24:04PM +0800, Rex Tsai wrote:
> From: Wang Xingchao <xingchao.wang@intel.com>
>
> 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] [drmutput_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: Rex Tsai <rex.tsai@canonical.com>
> ---
> drivers/gpu/drm/i915/intel_hdmi.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 9cd81ba..427ec8c 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -269,10 +269,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode)
> 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;
> + u32 enable_bits = SDVO_ENABLE | SDVO_AUDIO_ENABLE;

This is different from the patch merged in Linus tree for 3.6. Looking
at the discussion on https://patchwork.kernel.org/patch/1450051/, it
points we should use what was merged
(commit b98b60167279df3acac9422c3c9820d9ebbcf9fb)

>
> temp = I915_READ(intel_hdmi->sdvox_reg);
>
> --
> 1.7.9.5

--
[]'s
Herton

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 01:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org