From: Jani Nikula Subject: [PATCH] drm/i915/audio: do not set Maud/Naud values manually on KBL Date: Tue, 6 Feb 2018 13:49:18 +0200 Message-ID: <20180206114918.29389-1-jani.nikula@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Sender: stable-owner@vger.kernel.org To: intel-gfx@lists.freedesktop.org Cc: Jani Nikula , "# v4 . 10+" , Keqiao Zhang , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Mengdong Lin , Libin Yang , Rodrigo Vivi , Quanxian Wang , Wang Zhijun , Cui Yueping , Alice Liu List-Id: intel-gfx@lists.freedesktop.org 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 Fixes: 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset") Cc: # v4.10+ Cc: Keqiao Zhang Cc: Ville Syrjälä Cc: Mengdong Lin Cc: Libin Yang Cc: Rodrigo Vivi Cc: Quanxian Wang Cc: Wang Zhijun Cc: Cui Yueping Cc: Alice Liu Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Jani Nikula --- 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 -- 2.11.0