Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp129042rdb; Tue, 5 Dec 2023 00:10:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHShdUBH5DHfiNtRpDp1bd9aJXA89GE7JpQs9kuL/UpcrOD1VHZOezlucdL1uTookYRTbSn X-Received: by 2002:a05:6a20:da9f:b0:18f:97c:5b7a with SMTP id iy31-20020a056a20da9f00b0018f097c5b7amr2564190pzb.72.1701763826060; Tue, 05 Dec 2023 00:10:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701763826; cv=none; d=google.com; s=arc-20160816; b=pvlqQteLzEVAicQ+rk4K6C4IObH6/a5oa2RQAb2O/yB/3iC/vI1rYIZJaDiWJd1FQz l+c1O7soOjMzAAdDpMvBBnvIlHRyM4+WkcPztJRGYm69Vb1cYpvG5G2+YTzMQTrOqG0b lMsY8KuMkV9l6s2NdmSfq9SnUtt9BmKLYRnYVj/AbpbE17i0Mgy6arJEqNEhp1pRsvba ++gqW6EfBN8Aj2mBcWS0Kw9bQ4hKSMZbrHULmn7ZZVt2PiDLnfDSTom01JvAIgc9P9w3 lQ6PcKKsC1kbbOzaGD8URE/KUAW2c/RYBAS2GN5S8Md55A78ygR/xSSe6euaQJTErDOM jTSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=5V3wLl/1K6qC1jGKVnuHspCw66aWivtnYqsvOjABLEs=; fh=6fL1NhFCGI+wAVvsHH1pL+P1muGn2uwGLcwd3RTuFww=; b=P1xDXFE5m/UzwVBA1GX7gzklmTE5fVuKCyq7bpclf9K1INwsexVOoIyFM3S5y3EDyr vO3BDpxQOFOfB7NNP4c2hvtOLUtClr28SV9TB/ytSuv+O5IzgwpHHfXJcd5MZDB/jmeu oJ+1JMHK9iNN68JnKxU255JoQ7pAXGD5Iz8N+y0uGIcGFJ9BqKSEhY2pln7Y83IyxNC+ I6RTDrCnUM33LrUAA0ytXeU/B7zdl11kqWIWsD08MkfVwqhx89UmfN2klZQE7xoB5Llt KL1udKw+zcF8VGxbjgGpRnlJJmYcPZDEXZpHOngVbwKbhZGXSDsHAtM7uQKiS/aQUisi 2Luw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=PnaOPacs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id t23-20020a170902b21700b001cfc46abb07si4319301plr.128.2023.12.05.00.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:10:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=PnaOPacs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 78E7C8040ED1; Tue, 5 Dec 2023 00:10:24 -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 S1376469AbjLEIKG (ORCPT + 99 others); Tue, 5 Dec 2023 03:10:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231722AbjLEIKB (ORCPT ); Tue, 5 Dec 2023 03:10:01 -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 C15AA127; Tue, 5 Dec 2023 00:10:07 -0800 (PST) Received: from [127.0.1.1] (91-158-149-209.elisa-laajakaista.fi [91.158.149.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2FF0CEEE; Tue, 5 Dec 2023 09:09:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701763764; bh=WNFwBf6lfujD0ZQ+VOP/UJchIYnz0NMJp9HloMbZytA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PnaOPacsNt55CsSxBteS0KdXjZuHHlLbjuZw2U3XpRZbabFJD3MEq1VFag4cIAX0a G+DyM175on5WDyMg4NpXol3r2XHfXQO7jcaH2w8f/wEZhrPo/utPUtbZ7HbU6EUCsm YRpjZvs+dlf4TcgalR58edCgbVZG5D86YwSQPKRI= From: Tomi Valkeinen Date: Tue, 05 Dec 2023 10:09:33 +0200 Subject: [PATCH 2/4] media: rkisp1: Fix IRQ handler return values MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231205-rkisp-irq-fix-v1-2-f4045c74ba45@ideasonboard.com> References: <20231205-rkisp-irq-fix-v1-0-f4045c74ba45@ideasonboard.com> In-Reply-To: <20231205-rkisp-irq-fix-v1-0-f4045c74ba45@ideasonboard.com> To: Dafna Hirschfeld , Laurent Pinchart , Mauro Carvalho Chehab , Heiko Stuebner , Paul Elder Cc: 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, Tomi Valkeinen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1603; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=WNFwBf6lfujD0ZQ+VOP/UJchIYnz0NMJp9HloMbZytA=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlbtrYHUyIcw9QFvbFkSIrfTb+8f/fz4Git+i/W 6Gu5IM4MJqJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZW7a2AAKCRD6PaqMvJYe 9dKSEACJtMy5hagG9Dgbka6/kKGcekwuWk4WVA+I0YyWHK3zz6ryIxYta3z/0swDdSIz7cAg58m af6c5kr2Mi5CgLYgh4sokjBBQOaX3AFIz0rGSxz2J/KFdQZOz4Yq9BBciF8qQBpetAIzDgcxgkq nEGmykPUCKesFrjk1gQOFIlq4EMbg0yfIuCs6E0Bc52Mu0yEy+91sgiCqwX76AOS62xaPUMVndJ vQB/A//jHQxdn5zeNtoUYlXcnpl7BT5CBQcIaEUTiMSCS29PZvBZ/kqmyFXQ4MasjBkBDGrHB6D GFc7xbsYYzqTn+tzg8Jcw7fZEPKoDV6Dg3eTo0biDVSCyu4l8CRFODZU+LcvXj+I7RmAJNOVgw+ qGbCKH1iE/IbygRVFS3nWQuKIp4rO0JjTBH8fbspQifIsjuk0DYeJj4DzqlpmnWbvNbobfc/kzq lxrCrLrEm7EJgaOx3Ww4iaE0XoFKzkkGx7TnBoX79ywepqARu6EWgb6ejdkd5rhhGn5aAPdVAH0 j7J6QM0mH41FwAky6Gzu5AjCwhUndC3p6zZy2wUQB4VW4zG9acoueE3xuXB3IUABBVELQeBs37v ZNaCMzxlAg4v/GpDtZTDoREqphZKSmtjvxSOQwNgdNH44JI2UPvm7xvK6THnIAQ49HuRYw6XYTS SfnS5jlZ1/b/xAQ== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 00:10:24 -0800 (PST) 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; + /* * 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; + + 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[] = { -- 2.34.1