From patchwork Fri Jan 13 09:54:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tretter X-Patchwork-Id: 642243 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50A92C54EBE for ; Fri, 13 Jan 2023 09:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240408AbjAMJ5o (ORCPT ); Fri, 13 Jan 2023 04:57:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241136AbjAMJ5O (ORCPT ); Fri, 13 Jan 2023 04:57:14 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A710F6D50B for ; Fri, 13 Jan 2023 01:54:24 -0800 (PST) Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pGGlO-0003cp-2u; Fri, 13 Jan 2023 10:54:18 +0100 From: Michael Tretter Date: Fri, 13 Jan 2023 10:54:21 +0100 Subject: [PATCH v2 15/16] media: imx-pxp: Use non-threaded IRQ MIME-Version: 1.0 Message-Id: <20230112-imx-pxp-v2-15-e2281da1db55@pengutronix.de> References: <20230112-imx-pxp-v2-0-e2281da1db55@pengutronix.de> In-Reply-To: <20230112-imx-pxp-v2-0-e2281da1db55@pengutronix.de> To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, Philipp Zabel , Laurent Pinchart Cc: Michael Tretter , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Fabio Estevam , Alexander Stein , kernel@pengutronix.de, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.11.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::54 X-SA-Exim-Mail-From: m.tretter@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: devicetree@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Laurent Pinchart There's no need to use threaded IRQs with the PXP, as the interrupt handler doesn't need to sleep and doesn't perform any time-consuming operation. Switch to regular IRQ handler. This fixes lockups of the PXP noticed on i.MX7, where the PXP would stop generating interrupts after a variable number of frames (from a few dozens to a few hundreds). The root cause is however unknown. Signed-off-by: Laurent Pinchart Reviewed-by: Michael Tretter Signed-off-by: Michael Tretter --- Changes since v2: - Drop IRQF_TRIGGER_HIGH - pick from https://lore.kernel.org/linux-media/20230112172507.30579-1-laurent.pinchart@ideasonboard.com/ --- drivers/media/platform/nxp/imx-pxp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/nxp/imx-pxp.c b/drivers/media/platform/nxp/imx-pxp.c index 124d272194d1..b8a7e49cbc08 100644 --- a/drivers/media/platform/nxp/imx-pxp.c +++ b/drivers/media/platform/nxp/imx-pxp.c @@ -1798,8 +1798,8 @@ static int pxp_probe(struct platform_device *pdev) spin_lock_init(&dev->irqlock); - ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, pxp_irq_handler, - IRQF_ONESHOT, dev_name(&pdev->dev), dev); + ret = devm_request_irq(&pdev->dev, irq, pxp_irq_handler, 0, + dev_name(&pdev->dev), dev); if (ret < 0) { dev_err(&pdev->dev, "Failed to request irq: %d\n", ret); return ret;