Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp230395rdb; Tue, 5 Dec 2023 04:04:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRRmlqZxqUiuDAnmIBWkhnjsoWm5R6NFxSntUHstM5378WPSh+e6sSIWf67aSeatMiY9Jm X-Received: by 2002:a17:90b:118d:b0:286:a6bf:2a16 with SMTP id gk13-20020a17090b118d00b00286a6bf2a16mr1032207pjb.51.1701777881475; Tue, 05 Dec 2023 04:04:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701777881; cv=none; d=google.com; s=arc-20160816; b=Ge1bqhMLteAld6eRU5c1c/EmYirlUjG9rFAyFbXZBQdjF9YpkLKSNgBLBPUBu5tBpH X+JsapZYKoF9hlbiuy5Ni1woKfwfxsqg2Iw7xeYvs7p/hNGcJ5Or/mOlU6C9tg8T8wdS sRRXd2IwHWTrolDHa1AvEHUrYHEB+LUQVK7Q5KpMQaa7AXOLp8pG+jIrhVe7uFuSCgb+ ChPrv7qoTNmx2vhjVnKT5Q5InKCrzHT3e2qGTw2krxvUnp/rvOhbpbqoj8U2nSrL1X3r QGkVC6FoqCY5i/TMXAEPrzcMQY5lzTSSWmxnlFcSKZ17B49ZaRYf5A1ppljAjOluBpAI 4Seg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=05VYIFbCUvmpehLO4kpRy/kISyGktM4yhdPHqcEueoI=; fh=R21zpjKbl9YWrtu/YTsLnY0FeiDryfrWDIu5g6GjEVY=; b=RotEke+aKscKomqpoZpkbBuj8haHBHTVp+w9s8XA2btuHlfei2c8bkUjziFZ3MSlzz pwl4Depo0K6N5dLYvTL6NID+MqTLF5htwfjly2dLT9o9njL0OYvkhKJEVrUP4pPPhvqi auOZSgjDUkJ31Lx0Pn+r288IVRvRn2kCf21wAPAMD3FzmYHM1xbTICIRCku5JpOguOqJ PuefwRf4Ili22DWlOsSZXnS6xAccujk4z+IOXQzfCByC1954ZMQTkQxktkrqkcg57ue4 oKk4CTqkGvVhnzQg7FeO/2VyZX8hdxSokvpceBItiy6ZtOTS4O/6UxtJTtrpB8kkU5pp 5Y7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=JS1atgLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z9-20020a17090a1fc900b00286e753e2efsi574973pjz.141.2023.12.05.04.04.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 04:04:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=JS1atgLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 12F6980C244F; Tue, 5 Dec 2023 04:04:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442357AbjLEMEa (ORCPT + 99 others); Tue, 5 Dec 2023 07:04:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442342AbjLEME3 (ORCPT ); Tue, 5 Dec 2023 07:04:29 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3E21C3; Tue, 5 Dec 2023 04:04:35 -0800 (PST) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DDE96844; Tue, 5 Dec 2023 13:03:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701777834; bh=rxY8uJX52+CDwxpiKj8J/NBwZBTNLXNQ86G0OAH3DTQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JS1atgLuEi85qXwn7oAOOgu2q9O9ukqrUnmRGCbx8oav/6bJVIkhmdOa/YP6rtvvd 9eowlDRZhGm1zSzp9nM9Cp0O+qi8/sRP2Z2YYLejKlL+c2d+AHRcTv+T4aEfasAt8O YLUb2HJWkmv7oEtavg2YBECM6wDa6cosGKH0eF+I= Date: Tue, 5 Dec 2023 14:04:41 +0200 From: Laurent Pinchart To: Tomi Valkeinen Cc: Dafna Hirschfeld , Mauro Carvalho Chehab , Heiko Stuebner , Paul Elder , Alexander Stein , kieran.bingham@ideasonboard.com, umang.jain@ideasonboard.com, aford173@gmail.com, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] media: rkisp1: Fix IRQ handler return values Message-ID: <20231205120441.GD17394@pendragon.ideasonboard.com> References: <20231205-rkisp-irq-fix-v1-0-f4045c74ba45@ideasonboard.com> <20231205-rkisp-irq-fix-v1-2-f4045c74ba45@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231205-rkisp-irq-fix-v1-2-f4045c74ba45@ideasonboard.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 04:04:40 -0800 (PST) Hi Tomi, Thank you for the patch. On Tue, Dec 05, 2023 at 10:09:33AM +0200, Tomi Valkeinen wrote: > The IRQ handler rkisp1_isr() calls sub-handlers, all of which returns an > irqreturn_t value, but rkisp1_isr() ignores those values and always > returns IRQ_HANDLED. > > Fix this by collecting the return values, and returning IRQ_HANDLED or > IRQ_NONE as appropriate. > > Signed-off-by: Tomi Valkeinen > --- > drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 18 ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c > index 76f93614b4cf..1d60f4b8bd09 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c > @@ -445,17 +445,27 @@ static int rkisp1_entities_register(struct rkisp1_device *rkisp1) > > static irqreturn_t rkisp1_isr(int irq, void *ctx) > { > + irqreturn_t ret; irqreturn_t ret = IRQ_NONE; > + > /* > * Call rkisp1_capture_isr() first to handle the frame that > * potentially completed using the current frame_sequence number before > * it is potentially incremented by rkisp1_isp_isr() in the vertical > * sync. > */ > - rkisp1_capture_isr(irq, ctx); > - rkisp1_isp_isr(irq, ctx); > - rkisp1_csi_isr(irq, ctx); > > - return IRQ_HANDLED; > + ret = IRQ_NONE; And drop this. Reviewed-by: Laurent Pinchart > + > + if (rkisp1_capture_isr(irq, ctx) == IRQ_HANDLED) > + ret = IRQ_HANDLED; > + > + if (rkisp1_isp_isr(irq, ctx) == IRQ_HANDLED) > + ret = IRQ_HANDLED; > + > + if (rkisp1_csi_isr(irq, ctx) == IRQ_HANDLED) > + ret = IRQ_HANDLED; > + > + return ret; > } > > static const char * const px30_isp_clks[] = { -- Regards, Laurent Pinchart