mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Jernej Skrabec <jernej.skrabec@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Chen-Yu Tsai <wens@kernel.org>,
	Samuel Holland <samuel@sholland.org>,
	Hans Verkuil <hverkuil@kernel.org>,
	Maxime Ripard <mripard@kernel.org>
Cc: linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: sun8i-di: Don't sleep while waiting for coefficient access
Date: Thu, 26 Nov 2026 17:26:34 -0500	[thread overview]
Message-ID: <f41c7d6471f41d7fcc2109e14289e47091610822.camel@ndufresne.ca> (raw)
In-Reply-To: <20261104185930.885203-1-jernej.skrabec@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

Le mercredi 04 novembre 2026 à 19:59 +0100, Jernej Skrabec a écrit :
> deinterlace_irq() calls deinterlace_device_run() to start processing
> the second field, so it runs in hard interrupt context. However,
> deinterlace_device_run() waits for coefficient access with
> readl_poll_timeout(), which may sleep.
> 
> Use readl_poll_timeout_atomic() instead.
> 
> Fixes: a4260ea49547 ("media: sun4i: Add H3 deinterlace driver")
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
>  drivers/media/platform/sunxi/sun8i-di/sun8i-di.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
> index 65bc426e5aac..bb90e0efa4d1 100644
> --- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
> +++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
> @@ -163,8 +163,8 @@ static void deinterlace_device_run(void *priv)
>  	/* neutral filter coefficients */
>  	deinterlace_set_bits(dev, DEINTERLACE_FRM_CTRL,
>  			     DEINTERLACE_FRM_CTRL_COEF_ACCESS);
> -	readl_poll_timeout(dev->base + DEINTERLACE_STATUS, val,
> -			   val & DEINTERLACE_STATUS_COEF_STATUS, 2, 40);
> +	readl_poll_timeout_atomic(dev->base + DEINTERLACE_STATUS, val,
> +				  val & DEINTERLACE_STATUS_COEF_STATUS, 2, 40);
>  
>  	for (i = 0; i < 32; i++) {
>  		deinterlace_write(dev, DEINTERLACE_CH0_HORZ_COEF0 + i * 4,
> 
> base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-11-26 22:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 18:59 Jernej Skrabec
2026-11-26 22:26 ` Nicolas Dufresne [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=f41c7d6471f41d7fcc2109e14289e47091610822.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=hverkuil@kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wens@kernel.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 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®