dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: move to use request_irq by IRQF_NO_AUTOEN flag
@ 2021-03-12 11:43 Tian Tao
  2021-03-12 14:28 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2021-03-12 11:43 UTC (permalink / raw)
  To: airlied, daniel, krzk; +Cc: dri-devel

After this patch cbe16f35bee68 genirq: Add IRQF_NO_AUTOEN for
request_irq/nmi() is merged. request_irq() after setting
IRQ_NOAUTOEN as below

irq_set_status_flags(irq, IRQ_NOAUTOEN);
request_irq(dev, irq...);
can be replaced by request_irq() with IRQF_NO_AUTOEN flag.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 ++--
 drivers/gpu/drm/exynos/exynos_drm_dsi.c       | 7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 1f79bc2..f530aff 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -775,8 +775,8 @@ static int decon_conf_irq(struct decon_context *ctx, const char *name,
 			return irq;
 		}
 	}
-	irq_set_status_flags(irq, IRQ_NOAUTOEN);
-	ret = devm_request_irq(ctx->dev, irq, handler, flags, "drm_decon", ctx);
+	ret = devm_request_irq(ctx->dev, irq, handler,
+			       flags | IRQ_NOAUTOEN, "drm_decon", ctx);
 	if (ret < 0) {
 		dev_err(ctx->dev, "IRQ %s request failed\n", name);
 		return ret;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 83ab6b3..fd9b133b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1352,10 +1352,9 @@ static int exynos_dsi_register_te_irq(struct exynos_dsi *dsi,
 	}
 
 	te_gpio_irq = gpio_to_irq(dsi->te_gpio);
-	irq_set_status_flags(te_gpio_irq, IRQ_NOAUTOEN);
 
 	ret = request_threaded_irq(te_gpio_irq, exynos_dsi_te_irq_handler, NULL,
-					IRQF_TRIGGER_RISING, "TE", dsi);
+				   IRQF_TRIGGER_RISING | IRQ_NOAUTOEN, "TE", dsi);
 	if (ret) {
 		dev_err(dsi->dev, "request interrupt failed with %d\n", ret);
 		gpio_free(dsi->te_gpio);
@@ -1802,9 +1801,9 @@ static int exynos_dsi_probe(struct platform_device *pdev)
 	if (dsi->irq < 0)
 		return dsi->irq;
 
-	irq_set_status_flags(dsi->irq, IRQ_NOAUTOEN);
 	ret = devm_request_threaded_irq(dev, dsi->irq, NULL,
-					exynos_dsi_irq, IRQF_ONESHOT,
+					exynos_dsi_irq,
+					IRQF_ONESHOT | IRQ_NOAUTOEN,
 					dev_name(dev), dsi);
 	if (ret) {
 		dev_err(dev, "failed to request dsi irq\n");
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/exynos: move to use request_irq by IRQF_NO_AUTOEN flag
  2021-03-12 11:43 [PATCH] drm/exynos: move to use request_irq by IRQF_NO_AUTOEN flag Tian Tao
@ 2021-03-12 14:28 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2021-03-12 14:28 UTC (permalink / raw)
  To: Tian Tao; +Cc: airlied, dri-devel, krzk

On Fri, Mar 12, 2021 at 07:43:05PM +0800, Tian Tao wrote:
> After this patch cbe16f35bee68 genirq: Add IRQF_NO_AUTOEN for
> request_irq/nmi() is merged. request_irq() after setting
> IRQ_NOAUTOEN as below
> 
> irq_set_status_flags(irq, IRQ_NOAUTOEN);
> request_irq(dev, irq...);
> can be replaced by request_irq() with IRQF_NO_AUTOEN flag.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

To get all your nice cleanups land faster I strongly recommend you review
other people's small patches. And then ask them to review yours in return.
You have already drm-misc commit rights, so should be all ready to go and
do lots of great stuff!

Cheers, Daniel

> ---
>  drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 ++--
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c       | 7 +++----
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> index 1f79bc2..f530aff 100644
> --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> @@ -775,8 +775,8 @@ static int decon_conf_irq(struct decon_context *ctx, const char *name,
>  			return irq;
>  		}
>  	}
> -	irq_set_status_flags(irq, IRQ_NOAUTOEN);
> -	ret = devm_request_irq(ctx->dev, irq, handler, flags, "drm_decon", ctx);
> +	ret = devm_request_irq(ctx->dev, irq, handler,
> +			       flags | IRQ_NOAUTOEN, "drm_decon", ctx);
>  	if (ret < 0) {
>  		dev_err(ctx->dev, "IRQ %s request failed\n", name);
>  		return ret;
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 83ab6b3..fd9b133b 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1352,10 +1352,9 @@ static int exynos_dsi_register_te_irq(struct exynos_dsi *dsi,
>  	}
>  
>  	te_gpio_irq = gpio_to_irq(dsi->te_gpio);
> -	irq_set_status_flags(te_gpio_irq, IRQ_NOAUTOEN);
>  
>  	ret = request_threaded_irq(te_gpio_irq, exynos_dsi_te_irq_handler, NULL,
> -					IRQF_TRIGGER_RISING, "TE", dsi);
> +				   IRQF_TRIGGER_RISING | IRQ_NOAUTOEN, "TE", dsi);
>  	if (ret) {
>  		dev_err(dsi->dev, "request interrupt failed with %d\n", ret);
>  		gpio_free(dsi->te_gpio);
> @@ -1802,9 +1801,9 @@ static int exynos_dsi_probe(struct platform_device *pdev)
>  	if (dsi->irq < 0)
>  		return dsi->irq;
>  
> -	irq_set_status_flags(dsi->irq, IRQ_NOAUTOEN);
>  	ret = devm_request_threaded_irq(dev, dsi->irq, NULL,
> -					exynos_dsi_irq, IRQF_ONESHOT,
> +					exynos_dsi_irq,
> +					IRQF_ONESHOT | IRQ_NOAUTOEN,
>  					dev_name(dev), dsi);
>  	if (ret) {
>  		dev_err(dev, "failed to request dsi irq\n");
> -- 
> 2.7.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-12 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 11:43 [PATCH] drm/exynos: move to use request_irq by IRQF_NO_AUTOEN flag Tian Tao
2021-03-12 14:28 ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).