mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Anastasia Belova <abelova@astralinux.ru>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] [media] s5p-fimc: fix sleep in atomic in flite_hw_reset
Date: Thu, 23 May 2024 11:27:17 +0200	[thread overview]
Message-ID: <21501af5-7558-4a15-bf0c-76b530792a36@kernel.org> (raw)
In-Reply-To: <20240521073607.19426-1-abelova@astralinux.ru>

On 21/05/2024 09:36, Anastasia Belova wrote:
> flite_hw_reset is called in fimc_lite_resume with spinlock
> acquired that is forbidden. Replace usleep_range with udelay.
> 
> Fixes: 2b511edb986f ("[media] s5p-fimc: Add FIMC-LITE register definitions")
> Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
> ---
>  drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c b/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c
> index 2483277a6cb0..f1e7375c9a5f 100644
> --- a/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c
> +++ b/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c
> @@ -30,7 +30,7 @@ void flite_hw_reset(struct fimc_lite *dev)
>  		cfg = readl(dev->regs + FLITE_REG_CIGCTRL);
>  		if (cfg & FLITE_REG_CIGCTRL_SWRST_RDY)
>  			break;
> -		usleep_range(1000, 5000);
> +		udelay(1000);

I think the code is rather wrong in fimc_lite_resume() - this should be
called outside of spinlock, thus usleep is ok.

Best regards,
Krzysztof


      reply	other threads:[~2024-05-23  9:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21  7:36 Anastasia Belova
2024-05-23  9:27 ` Krzysztof Kozlowski [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=21501af5-7558-4a15-bf0c-76b530792a36@kernel.org \
    --to=krzk@kernel.org \
    --cc=abelova@astralinux.ru \
    --cc=alim.akhtar@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=s.nawrocki@samsung.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

all inboxes | Powered by JetHome®