intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/audio: 'scheduling while atomic' during system resume
@ 2024-04-09 13:01 Brent Lu
  2024-04-09  6:04 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Brent Lu @ 2024-04-09 13:01 UTC (permalink / raw)
  To: intel-gfx; +Cc: Brent Lu

The i915_audio_component_codec_wake_override() function will be called
during resume process so replace usleep_range() function calls with
udelay() to avoid the 'scheduling while atomic' error.

[22138.069052] BUG: scheduling while atomic: cras/2682/0x00000000
[22138.069359] Call Trace:
[22138.069369]  <TASK>
[22138.069380]  dump_stack_lvl+0x69/0x97
[22138.069407]  __schedule_bug+0x87/0x9a
[22138.069422]  __schedule+0x4f9/0xf88
[22138.069450]  schedule+0x4e/0xd0
[22138.069462]  schedule_hrtimeout_range_clock+0xab/0x11b
[22138.069488]  usleep_range_state+0x63/0x8c
[22138.069502]  i915_audio_component_codec_wake_override+0x8e/0xf2
[22138.069518]  snd_hdac_set_codec_wakeup+0x39/0x44 [snd_hda_core (HASH:381b 97)]
[22138.069541]  hda_dsp_ctrl_init_chip+0x45/0x414 [snd_sof_intel_hda_common (HASH:ff4d 98)]
[22138.069578]  hda_resume+0x4c/0xf2 [snd_sof_intel_hda_common (HASH:ff4d 98)]
[22138.069598]  hda_dsp_runtime_resume+0x32/0x9f [snd_sof_intel_hda_common (HASH:ff4d 98)]
[22138.069618]  sof_resume+0x67/0x234 [snd_sof (HASH:ad31 99)]
[22138.069655]  __rpm_callback+0x87/0x130
[22138.069680]  rpm_callback+0x22/0x77
[22138.069691]  rpm_resume+0x3bb/0x508

Signed-off-by: Brent Lu <brent.lu@intel.com>
---
 drivers/gpu/drm/i915/display/intel_audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
index 07e0c73204f3..9a85e6da63bf 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_audio.c
@@ -1120,12 +1120,12 @@ static void i915_audio_component_codec_wake_override(struct device *kdev,
 	 */
 	intel_de_rmw(i915, HSW_AUD_CHICKENBIT,
 		     SKL_AUD_CODEC_WAKE_SIGNAL, 0);
-	usleep_range(1000, 1500);
+	udelay(1000);
 
 	if (enable) {
 		intel_de_rmw(i915, HSW_AUD_CHICKENBIT,
 			     0, SKL_AUD_CODEC_WAKE_SIGNAL);
-		usleep_range(1000, 1500);
+		udelay(1000);
 	}
 
 	i915_audio_component_put_power(kdev, cookie);
-- 
2.34.1


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

end of thread, other threads:[~2024-04-10 15:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 13:01 [PATCH] drm/i915/audio: 'scheduling while atomic' during system resume Brent Lu
2024-04-09  6:04 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2024-04-09  6:08 ` ✓ Fi.CI.BAT: success " Patchwork
2024-04-09 10:30 ` [PATCH] " Jani Nikula
2024-04-10 15:06 ` ✗ Fi.CI.IGT: failure for " Patchwork

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).