intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] drm/i915/audio: fix hdmi audio noise issue
@ 2016-11-11  8:46 libin.yang
  2016-11-11  9:17 ` ✗ Fi.CI.BAT: warning for drm/i915/audio: fix hdmi audio noise issue (rev3) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: libin.yang @ 2016-11-11  8:46 UTC (permalink / raw)
  To: intel-gfx, jani.nikula, ville.syrjala, daniel.vetter, tiwai

From: Libin Yang <libin.yang@intel.com>

Some monitors will have noise or even no sound after
applying the patch 6014ac12.

In patch 6014ac12, it will reset the cts value to 0 for HDMI.
However, we need to disable Enable CTS or M Prog bit. This is
the initial setting after HW reset.

Fixes: 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset")
Signed-off-by: Libin Yang <libin.yang@intel.com>
---
 drivers/gpu/drm/i915/intel_audio.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 195223d..88ed869 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -351,10 +351,13 @@ hsw_hdmi_audio_config_update(struct intel_crtc *intel_crtc, enum port port,
 
 	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
 
+	/*
+	 * Let's disable "Enable CTS or M Prog bit"
+	 * and let HW calculate the value
+	 */
 	tmp = I915_READ(HSW_AUD_M_CTS_ENABLE(pipe));
-	tmp &= ~AUD_CONFIG_M_MASK;
+	tmp &= ~AUD_M_CTS_M_PROG_ENABLE;
 	tmp &= ~AUD_M_CTS_M_VALUE_INDEX;
-	tmp |= AUD_M_CTS_M_PROG_ENABLE;
 	I915_WRITE(HSW_AUD_M_CTS_ENABLE(pipe), tmp);
 }
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✗ Fi.CI.BAT: warning for drm/i915/audio: fix hdmi audio noise issue (rev3)
  2016-11-11  8:46 [PATCH v3] drm/i915/audio: fix hdmi audio noise issue libin.yang
@ 2016-11-11  9:17 ` Patchwork
  2016-11-11  9:36 ` [PATCH v3] drm/i915/audio: fix hdmi audio noise issue Jani Nikula
  2016-11-24 15:40 ` Jani Nikula
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2016-11-11  9:17 UTC (permalink / raw)
  To: libin.yang; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/audio: fix hdmi audio noise issue (rev3)
URL   : https://patchwork.freedesktop.org/series/15012/
State : warning

== Summary ==

Series 15012v3 drm/i915/audio: fix hdmi audio noise issue
https://patchwork.freedesktop.org/api/1.0/series/15012/revisions/3/mbox/

Test drv_module_reload_basic:
                pass       -> DMESG-WARN (fi-skl-6770hq)

fi-bdw-5557u     total:244  pass:229  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:244  pass:204  dwarn:0   dfail:0   fail:0   skip:40 
fi-bxt-t5700     total:244  pass:216  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20 
fi-ilk-650       total:244  pass:191  dwarn:0   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-ivb-3770      total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-kbl-7200u     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:244  pass:223  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:244  pass:229  dwarn:1   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32 
fi-snb-2600      total:244  pass:211  dwarn:0   dfail:0   fail:0   skip:33 

0ecf26a8d5fc565fca1da9d66f65863de5e00ead drm-intel-nightly: 2016y-11m-11d-08h-21m-01s UTC integration manifest
bfc1b19 drm/i915/audio: fix hdmi audio noise issue

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2961/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] drm/i915/audio: fix hdmi audio noise issue
  2016-11-11  8:46 [PATCH v3] drm/i915/audio: fix hdmi audio noise issue libin.yang
  2016-11-11  9:17 ` ✗ Fi.CI.BAT: warning for drm/i915/audio: fix hdmi audio noise issue (rev3) Patchwork
@ 2016-11-11  9:36 ` Jani Nikula
  2016-11-24 15:40 ` Jani Nikula
  2 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2016-11-11  9:36 UTC (permalink / raw)
  To: libin.yang, intel-gfx, ville.syrjala, daniel.vetter, tiwai

On Fri, 11 Nov 2016, libin.yang@intel.com wrote:
> From: Libin Yang <libin.yang@intel.com>
>
> Some monitors will have noise or even no sound after
> applying the patch 6014ac12.
>
> In patch 6014ac12, it will reset the cts value to 0 for HDMI.
> However, we need to disable Enable CTS or M Prog bit. This is
> the initial setting after HW reset.
>
> Fixes: 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset")
> Signed-off-by: Libin Yang <libin.yang@intel.com>

If this works, I guess all I can say is,

Acked-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_audio.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> index 195223d..88ed869 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -351,10 +351,13 @@ hsw_hdmi_audio_config_update(struct intel_crtc *intel_crtc, enum port port,
>  
>  	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
>  
> +	/*
> +	 * Let's disable "Enable CTS or M Prog bit"
> +	 * and let HW calculate the value
> +	 */
>  	tmp = I915_READ(HSW_AUD_M_CTS_ENABLE(pipe));
> -	tmp &= ~AUD_CONFIG_M_MASK;
> +	tmp &= ~AUD_M_CTS_M_PROG_ENABLE;
>  	tmp &= ~AUD_M_CTS_M_VALUE_INDEX;
> -	tmp |= AUD_M_CTS_M_PROG_ENABLE;
>  	I915_WRITE(HSW_AUD_M_CTS_ENABLE(pipe), tmp);
>  }

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] drm/i915/audio: fix hdmi audio noise issue
  2016-11-11  8:46 [PATCH v3] drm/i915/audio: fix hdmi audio noise issue libin.yang
  2016-11-11  9:17 ` ✗ Fi.CI.BAT: warning for drm/i915/audio: fix hdmi audio noise issue (rev3) Patchwork
  2016-11-11  9:36 ` [PATCH v3] drm/i915/audio: fix hdmi audio noise issue Jani Nikula
@ 2016-11-24 15:40 ` Jani Nikula
  2 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2016-11-24 15:40 UTC (permalink / raw)
  To: libin.yang, intel-gfx, ville.syrjala, daniel.vetter, tiwai

On Fri, 11 Nov 2016, libin.yang@intel.com wrote:
> From: Libin Yang <libin.yang@intel.com>
>
> Some monitors will have noise or even no sound after
> applying the patch 6014ac12.
>
> In patch 6014ac12, it will reset the cts value to 0 for HDMI.
> However, we need to disable Enable CTS or M Prog bit. This is
> the initial setting after HW reset.
>
> Fixes: 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset")
> Signed-off-by: Libin Yang <libin.yang@intel.com>

Pushed to dinq, thanks for the patch.

BR,
Jani.

> ---
>  drivers/gpu/drm/i915/intel_audio.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> index 195223d..88ed869 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -351,10 +351,13 @@ hsw_hdmi_audio_config_update(struct intel_crtc *intel_crtc, enum port port,
>  
>  	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
>  
> +	/*
> +	 * Let's disable "Enable CTS or M Prog bit"
> +	 * and let HW calculate the value
> +	 */
>  	tmp = I915_READ(HSW_AUD_M_CTS_ENABLE(pipe));
> -	tmp &= ~AUD_CONFIG_M_MASK;
> +	tmp &= ~AUD_M_CTS_M_PROG_ENABLE;
>  	tmp &= ~AUD_M_CTS_M_VALUE_INDEX;
> -	tmp |= AUD_M_CTS_M_PROG_ENABLE;
>  	I915_WRITE(HSW_AUD_M_CTS_ENABLE(pipe), tmp);
>  }

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-24 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-11  8:46 [PATCH v3] drm/i915/audio: fix hdmi audio noise issue libin.yang
2016-11-11  9:17 ` ✗ Fi.CI.BAT: warning for drm/i915/audio: fix hdmi audio noise issue (rev3) Patchwork
2016-11-11  9:36 ` [PATCH v3] drm/i915/audio: fix hdmi audio noise issue Jani Nikula
2016-11-24 15:40 ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).