From: Rodrigo Vivi Subject: Re: [PATCH] drm/i915/audio: do not set Maud/Naud values manually on KBL Date: Tue, 6 Feb 2018 10:35:14 -0800 Message-ID: <20180206183514.c7tsonzbg7ahwgaf@intel.com> References: <20180206114918.29389-1-jani.nikula@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20180206114918.29389-1-jani.nikula@intel.com> Sender: stable-owner@vger.kernel.org To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org, "# v4 . 10+" , Keqiao Zhang , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Mengdong Lin , Libin Yang , Quanxian Wang , Wang Zhijun , Cui Yueping , Alice Liu List-Id: intel-gfx@lists.freedesktop.org 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 > 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)) 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 >