Apparently using the manual Maud/Naud mode does not work on KBL. The details on the failure mode are scarce, except that there's no audio, and there is obviously no idea on the root cause either. It is also unknown whether the failure can be reproduced on newer platforms in some scenarios.
The problem was introduced when switching from automatic mode to manual mode in commit 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset"). Instead of reverting that, disable the feature on KBL as a workaround.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104093 Reported-by: Quanxian Wang quanxian.wang@intel.com Fixes: 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset") Cc: stable@vger.kernel.org # v4.10+ Cc: Keqiao Zhang keqiao.zhang@intel.com Cc: Ville Syrjälä ville.syrjala@linux.intel.com Cc: Mengdong Lin mengdong.lin@intel.com Cc: Libin Yang libin.yang@linux.intel.com Cc: Rodrigo Vivi rodrigo.vivi@intel.com Cc: Quanxian Wang quanxian.wang@intel.com Cc: Wang Zhijun zhijunx.wang@intel.com Cc: Cui Yueping yuepingx.cui@intel.com Cc: Alice Liu alice.liu@intel.com Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Jani Nikula jani.nikula@intel.com
---
UNTESTED. Please provide Tested-by's on the affected KBLs, but *also* on CFL, CNL, etc. --- drivers/gpu/drm/i915/intel_audio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 522d54fecb53..b7634cff12b6 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -294,12 +294,19 @@ hsw_dp_audio_config_update(struct intel_encoder *encoder, struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); enum port port = encoder->port; enum pipe pipe = crtc->pipe; - const struct dp_aud_n_m *nm; + const struct dp_aud_n_m *nm = NULL; int rate; u32 tmp;
rate = acomp ? acomp->aud_sample_rate[port] : 0; - nm = audio_config_dp_get_n_m(crtc_state, rate); + + /* + * FIXME: For reasons still unknown, there seem to be issues with the + * manual Maud/Naud mode on KBL. + */ + if (!IS_KABYLAKE(dev_priv)) + nm = audio_config_dp_get_n_m(crtc_state, rate); + if (nm) DRM_DEBUG_KMS("using Maud %u, Naud %u\n", nm->m, nm->n); else
On Tue, Feb 06, 2018 at 11:49:18AM +0000, Jani Nikula wrote:
Apparently using the manual Maud/Naud mode does not work on KBL. The details on the failure mode are scarce, except that there's no audio, and there is obviously no idea on the root cause either. It is also unknown whether the failure can be reproduced on newer platforms in some scenarios.
The problem was introduced when switching from automatic mode to manual mode in commit 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset"). Instead of reverting that, disable the feature on KBL as a workaround.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104093 Reported-by: Quanxian Wang quanxian.wang@intel.com Fixes: 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset") Cc: stable@vger.kernel.org # v4.10+ Cc: Keqiao Zhang keqiao.zhang@intel.com Cc: Ville Syrjälä ville.syrjala@linux.intel.com Cc: Mengdong Lin mengdong.lin@intel.com Cc: Libin Yang libin.yang@linux.intel.com Cc: Rodrigo Vivi rodrigo.vivi@intel.com Cc: Quanxian Wang quanxian.wang@intel.com Cc: Wang Zhijun zhijunx.wang@intel.com Cc: Cui Yueping yuepingx.cui@intel.com Cc: Alice Liu alice.liu@intel.com Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Jani Nikula jani.nikula@intel.com
UNTESTED. Please provide Tested-by's on the affected KBLs, but *also* on CFL, CNL, etc.
drivers/gpu/drm/i915/intel_audio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 522d54fecb53..b7634cff12b6 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -294,12 +294,19 @@ hsw_dp_audio_config_update(struct intel_encoder *encoder, struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); enum port port = encoder->port; enum pipe pipe = crtc->pipe;
- const struct dp_aud_n_m *nm;
- const struct dp_aud_n_m *nm = NULL; int rate; u32 tmp;
rate = acomp ? acomp->aud_sample_rate[port] : 0;
- nm = audio_config_dp_get_n_m(crtc_state, rate);
- /*
* FIXME: For reasons still unknown, there seem to be issues with the
* manual Maud/Naud mode on KBL.
*/
- if (!IS_KABYLAKE(dev_priv))
Hmm... not much visibility on the audio gap between KBL and CFL. But on our side I believe we should also apply it for CFL.
I wonder if some bugs audio guys are hunting now on CNL and ICL could also be related to it.
Isn't revert the original an option?
nm = audio_config_dp_get_n_m(crtc_state, rate);
- if (nm) DRM_DEBUG_KMS("using Maud %u, Naud %u\n", nm->m, nm->n); else
-- 2.11.0
-----Original Message----- From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of Rodrigo Vivi Sent: Wednesday, February 7, 2018 2:35 AM To: Nikula, Jani jani.nikula@intel.com Cc: Zhang, Keqiao keqiao.zhang@intel.com; Liu, Alice alice.liu@intel.com; intel-gfx@lists.freedesktop.org; Cui, YuepingX yuepingx.cui@intel.com; # v4 . 10+ stable@vger.kernel.org; Wang Zhijun zhijunx.wang@intel.com; Libin Yang libin.yang@linux.intel.com Subject: Re: [Intel-gfx] [PATCH] drm/i915/audio: do not set Maud/Naud values manually on KBL
On Tue, Feb 06, 2018 at 11:49:18AM +0000, Jani Nikula wrote:
Apparently using the manual Maud/Naud mode does not work on KBL. The details on the failure mode are scarce, except that there's no audio, and there is obviously no idea on the root cause either. It is also unknown whether the failure can be reproduced on newer platforms in some scenarios.
The problem was introduced when switching from automatic mode to manual mode in commit 6014ac122ed0 ("drm/i915/audio: set proper N/M
in
modeset"). Instead of reverting that, disable the feature on KBL as a workaround.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104093 Reported-by: Quanxian Wang quanxian.wang@intel.com Fixes: 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset") Cc: stable@vger.kernel.org # v4.10+ Cc: Keqiao Zhang keqiao.zhang@intel.com Cc: Ville Syrjälä ville.syrjala@linux.intel.com Cc: Mengdong Lin mengdong.lin@intel.com Cc: Libin Yang libin.yang@linux.intel.com Cc: Rodrigo Vivi rodrigo.vivi@intel.com Cc: Quanxian Wang quanxian.wang@intel.com Cc: Wang Zhijun zhijunx.wang@intel.com Cc: Cui Yueping yuepingx.cui@intel.com Cc: Alice Liu alice.liu@intel.com Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Jani Nikula jani.nikula@intel.com
UNTESTED. Please provide Tested-by's on the affected KBLs, but *also* on CFL, CNL, etc.
drivers/gpu/drm/i915/intel_audio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 522d54fecb53..b7634cff12b6 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -294,12 +294,19 @@ hsw_dp_audio_config_update(struct
intel_encoder *encoder,
struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); enum port port = encoder->port; enum pipe pipe = crtc->pipe;
- const struct dp_aud_n_m *nm;
const struct dp_aud_n_m *nm = NULL; int rate; u32 tmp;
rate = acomp ? acomp->aud_sample_rate[port] : 0;
- nm = audio_config_dp_get_n_m(crtc_state, rate);
- /*
* FIXME: For reasons still unknown, there seem to be issues with the
* manual Maud/Naud mode on KBL.
*/
- if (!IS_KABYLAKE(dev_priv))
Hmm... not much visibility on the audio gap between KBL and CFL. But on our side I believe we should also apply it for CFL.
I wonder if some bugs audio guys are hunting now on CNL and ICL could also be related to it.
I'm wondering whether the later new platforms will have the same behavior with KBL. If it is true, maybe we should use + if (need_manual_nm())
Let wait and see the later platforms behavior.
Regards, Libin
Isn't revert the original an option?
nm = audio_config_dp_get_n_m(crtc_state, rate);
- if (nm) DRM_DEBUG_KMS("using Maud %u, Naud %u\n", nm->m,
nm->n);
else
2.11.0
Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
linux-stable-mirror@lists.linaro.org