From: Eugen Hristev <ehristev@kernel.org>
To: Balakrishnan Sambath <balakrishnan.s@microchip.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Wenyou Yang <wenyou.yang@microchip.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] media: microchip-isc: don't sleep in the clk .is_enabled callback
Date: Thu, 27 Aug 2026 08:57:48 +0300 [thread overview]
Message-ID: <0db5871f-f638-4891-a79a-f256d44cbc06@kernel.org> (raw)
In-Reply-To: <20260819061920.22954-1-balakrishnan.s@microchip.com>
On 8/19/26 09:19, Balakrishnan Sambath wrote:
> isc_clk_is_enabled() calls pm_runtime_resume_and_get() and
> pm_runtime_put_sync(), which can sleep and are not safe here, as
> .is_enabled must run in atomic context. clk_disable_unused() calls it so
> at boot, and CONFIG_DEBUG_ATOMIC_SLEEP reports a "sleeping function
> called from invalid context" BUG.
>
> Use the atomic-safe pm_runtime_get_if_active() and pm_runtime_put()
> instead. A suspended ISC has its clocks gated, so report the clock
> disabled when the device is not already active.
>
> Fixes: 01192aa1c5c2 ("media: atmel-isc: Enable the clocks during probe")
> Cc: stable@vger.kernel.org
> Signed-off-by: Balakrishnan Sambath <balakrishnan.s@microchip.com>
> ---
Reviewed-by: Eugen Hristev <ehristev@kernel.org>
prev parent reply other threads:[~2026-08-27 5:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 6:19 [PATCH] media: microchip-isc: don't sleep in the clk .is_enabled callback Balakrishnan Sambath
2026-08-27 5:57 ` Eugen Hristev [this message]
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=0db5871f-f638-4891-a79a-f256d44cbc06@kernel.org \
--to=ehristev@kernel.org \
--cc=balakrishnan.s@microchip.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
--cc=wenyou.yang@microchip.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox