[PATCH] drm/i915/audio: 'scheduling while atomic' during system resume
Jani Nikula
jani.nikula at linux.intel.com
Tue Apr 9 10:30:20 UTC 2024
On Tue, 09 Apr 2024, Brent Lu <brent.lu at intel.com> wrote:
> 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.
That explanation does not hold water.
For example, what about the mutexes on the same paths?
BR,
Jani.
>
> [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 at 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);
--
Jani Nikula, Intel
More information about the Intel-gfx
mailing list