Skip to contentSkip to conversation

drm/i915/audio: do not set Maud/Naud values manually on KBL

PATCH In review Jani Nikula 4 participants 5 messages Feb 6, 2018 – Feb 11, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/audio: do not set Maud/Naud values manually on KBL

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

Fixes 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset")
Cc <[email protected]> # v4.10+
Cc Keqiao Zhang <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Mengdong Lin <[email protected]>
Cc Libin Yang <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Quanxian Wang <[email protected]>
Cc Wang Zhijun <[email protected]>
Cc Cui Yueping <[email protected]>
Cc Alice Liu <[email protected]>

---

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(-)
drivers/gpu/drm/i915/intel_audio.c +9 -2
index 522d54fecb53..b7634cff12b6 100644
@@ -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
Signature · 1 line
2.11.0
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915/audio: do not set Maud/Naud values manually on KBL

== Series Details ==

== Series Details ==

Series: drm/i915/audio: do not set Maud/Naud values manually on KBL
URL : https://patchwork.freedesktop.org/series/37730/
State : success

== Summary ==

Series 37730v1 drm/i915/audio: do not set Maud/Naud values manually on KBL
https://patchwork.freedesktop.org/api/1.0/series/37730/revisions/1/mbox/

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:417s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:373s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:484s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:483s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:484s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:467s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:455s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:575s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:576s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:413s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:282s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:510s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:392s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:398s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:417s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:462s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:414s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:461s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:498s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:455s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:501s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:595s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:427s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:511s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:523s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:493s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:487s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:414s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:430s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:530s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:393s

Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:470s

078873da383505cf8d6940229007115b31f1d5e0 drm-tip: 2018y-02m-06d-11h-21m-36s UTC integration manifest f1edb5c775e2 drm/i915/audio: do not set Maud/Naud values manually on KBL

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7904/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.IGT: success for drm/i915/audio: do not set Maud/Naud values manually on KBL

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915/audio: do not set Maud/Naud values manually on KBL
URL : https://patchwork.freedesktop.org/series/37730/
State : success

== Summary ==

Test perf:

        Subgroup enable-disable:
                fail       -> PASS       (shard-apl) fdo#103715
        Subgroup buffer-fill:
                fail       -> PASS       (shard-apl) fdo#103755
        Subgroup oa-exponents:
                pass       -> FAIL       (shard-apl) fdo#102254
Test kms_mmap_write_crc:
                skip       -> PASS       (shard-apl)
Test kms_flip:
        Subgroup flip-vs-panning-vs-hang:
                pass       -> DMESG-WARN (shard-snb) fdo#103821
Test gem_exec_schedule:
        Subgroup reorder-wide-vebox:
                incomplete -> PASS       (shard-apl) fdo#102848

fdo#103715 https://bugs.freedesktop.org/show_bug.cgi?id=103715
fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#102848 https://bugs.freedesktop.org/show_bug.cgi?id=102848

shard-apl        total:3383 pass:1752 dwarn:1   dfail:0   fail:21  skip:1608 time:12177s
shard-hsw        total:3442 pass:1758 dwarn:1   dfail:0   fail:11  skip:1671 time:11764s
shard-snb        total:3442 pass:1350 dwarn:2   dfail:0   fail:10  skip:2080 time:6520s

Blacklisted hosts:
shard-kbl total:3442 pass:1906 dwarn:4 dfail:1 fail:22 skip:1509 time:9640s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7904/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#3 lore raw
In reply to Jani Nikula
Quoted 46 lines · Jani Nikula

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

Fixes 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset")
Cc <[email protected]> # v4.10+
Cc Keqiao Zhang <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Mengdong Lin <[email protected]>
Cc Libin Yang <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Quanxian Wang <[email protected]>
Cc Wang Zhijun <[email protected]>
Cc Cui Yueping <[email protected]>
Cc Alice Liu <[email protected]>

---

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(-)
drivers/gpu/drm/i915/intel_audio.c +1 -1
index 522d54fecb53..b7634cff12b6 100644
@@ -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;

drivers/gpu/drm/i915/intel_audio.c hsw_dp_audio_config_update(struct intel_encoder *encoder, · line 307

Quoted 10 lines
drivers/gpu/drm/i915/intel_audio.c +6 -1
 	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?

Quoted 8 lines
drivers/gpu/drm/i915/intel_audio.c +2 -0
+		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
Signature · 1 line
2.11.0
#4 lore raw
Quoted 77 lines

-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Rodrigo Vivi
Sent: Wednesday, February 7, 2018 2:35 AM
To: Nikula, Jani <[email protected]>
Cc: Zhang, Keqiao <[email protected]>; Liu, Alice <[email protected]>; [email protected]; Cui, YuepingX <[email protected]>; # v4 . 10+ <[email protected]>; Wang Zhijun <[email protected]>; Libin Yang <[email protected]>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/audio: do not set Maud/Naud values manually on KBL

Quoted 8 lines · Jani Nikula

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

drivers/gpu/drm/i915/intel_audio.c hsw_dp_audio_config_update(struct

Quoted 33 lines

modeset"). Instead of reverting that, disable the feature on KBL as a workaround.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104093

Fixes 6014ac122ed0 ("drm/i915/audio: set proper N/M in modeset")
Cc <[email protected]> # v4.10+
Cc Keqiao Zhang <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Mengdong Lin <[email protected]>
Cc Libin Yang <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Quanxian Wang <[email protected]>
Cc Wang Zhijun <[email protected]>
Cc Cui Yueping <[email protected]>
Cc Alice Liu <[email protected]>

---

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(-)
drivers/gpu/drm/i915/intel_audio.c +0 -0
index 522d54fecb53..b7634cff12b6 100644
@@ -294,12 +294,19 @@ hsw_dp_audio_config_update(struct

intel_encoder *encoder,

Quoted 6 lines
drivers/gpu/drm/i915/intel_audio.c +1 -1
 	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;

drivers/gpu/drm/i915/intel_audio.c hsw_dp_audio_config_update(struct intel_encoder *encoder, · line 307

Quoted 10 lines
drivers/gpu/drm/i915/intel_audio.c +6 -1
 	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.

Quoted 2 lines

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

Quoted 16 lines

Isn't revert the original an option?

drivers/gpu/drm/i915/intel_audio.c hsw_dp_audio_config_update(struct intel_encoder *encoder,

Quoted 4 lines
drivers/gpu/drm/i915/intel_audio.c +2 -0
+		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);

Quoted 4 lines
drivers/gpu/drm/i915/intel_audio.c +0 -1
 	else
--

2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx