[PATCH 05/18] media: coda: using threaded_irq for 0 (bit) interrupt

Sergey Khimich posted 18 patches 9 months, 1 week ago
[PATCH 05/18] media: coda: using threaded_irq for 0 (bit) interrupt
Posted by Sergey Khimich 9 months, 1 week ago
From: Sergey Khimich <serghox@gmail.com>

Use threaded_irq for 0 (bit) interrupt instead of lowlevel locked irq.

Signed-off-by: Sergey Khimich <serghox@gmail.com>
---
 drivers/media/platform/chips-media/coda/coda-common.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c
index 64ba17d8adfb..b240091cdc9d 100644
--- a/drivers/media/platform/chips-media/coda/coda-common.c
+++ b/drivers/media/platform/chips-media/coda/coda-common.c
@@ -3184,8 +3184,10 @@ static int coda_probe(struct platform_device *pdev)
 	if (irq < 0)
 		return dev_err_probe(&pdev->dev, irq, "Failed to get irq 0 (bit)\n");
 
-	ret = devm_request_irq(&pdev->dev, irq, coda_irq_handler, 0,
-			       CODA_NAME "-video", dev);
+	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
+					coda_irq_handler,
+					IRQF_ONESHOT,
+					CODA_NAME "-video", (void *)(dev));
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to request irq: %d\n", ret);
 		return ret;
-- 
2.30.2
Re: [PATCH 05/18] media: coda: using threaded_irq for 0 (bit) interrupt
Posted by Nicolas Dufresne 6 months, 3 weeks ago
Hi,

Le vendredi 14 mars 2025 à 18:29 +0300, Sergey Khimich a écrit :
> From: Sergey Khimich <serghox@gmail.com>
> 
> Use threaded_irq for 0 (bit) interrupt instead of lowlevel locked irq.

You omitted a rationale for that, and don't find anything obvious, please
drop or defend this change further. Also, Jackson in Wave5/6 actually
maintain a hard IRQ for status register handling.

I'd say drop, or explain.

Nicolas

> 
> Signed-off-by: Sergey Khimich <serghox@gmail.com>
> ---
>  drivers/media/platform/chips-media/coda/coda-common.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-
> common.c
> index 64ba17d8adfb..b240091cdc9d 100644
> --- a/drivers/media/platform/chips-media/coda/coda-common.c
> +++ b/drivers/media/platform/chips-media/coda/coda-common.c
> @@ -3184,8 +3184,10 @@ static int coda_probe(struct platform_device *pdev)
>  	if (irq < 0)
>  		return dev_err_probe(&pdev->dev, irq, "Failed to get irq 0 (bit)\n");
>  
> -	ret = devm_request_irq(&pdev->dev, irq, coda_irq_handler, 0,
> -			       CODA_NAME "-video", dev);
> +	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
> +					coda_irq_handler,
> +					IRQF_ONESHOT,
> +					CODA_NAME "-video", (void *)(dev));
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "failed to request irq: %d\n", ret);
>  		return ret;