All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Brent Lu <brent.lu@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Brent Lu <brent.lu@intel.com>
Subject: Re: [PATCH] drm/i915/audio: 'scheduling while atomic' during system resume
Date: Tue, 09 Apr 2024 13:30:20 +0300	[thread overview]
Message-ID: <87jzl696bn.fsf@intel.com> (raw)
In-Reply-To: <20240409130113.3081587-1-brent.lu@intel.com>

On Tue, 09 Apr 2024, Brent Lu <brent.lu@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@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

  parent reply	other threads:[~2024-04-09 10:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Jani Nikula [this message]
2024-04-10 15:06 ` ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jzl696bn.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=brent.lu@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.