Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp384557rdb; Mon, 22 Jan 2024 07:14:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2EvfnIfgwTEnz8LmrRWy346e0h6FNZKlBaoZlmnKjKpHV9kzC86I/FxmGOqR+V9gvol/L X-Received: by 2002:a17:906:35c4:b0:a2c:b360:e153 with SMTP id p4-20020a17090635c400b00a2cb360e153mr1271996ejb.247.1705936458847; Mon, 22 Jan 2024 07:14:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705936458; cv=pass; d=google.com; s=arc-20160816; b=qCJgGlQ0YICwNGQ1Fixp7EY+lXI8ImhHun08h7SpB9qR1T4YvZMioCJY0D/5AjTJKk WdDYdUb/NwN9uexuBfVvfLG+27YtA6t1yOnIeoYGakzgKD3OSN7nfB4s09nXhUZKAJmZ caDwD/D1gu6/5tclvkLpBggapazrrYFfINL2aOqXOXOJivwnimIqinirzIfslmIlEApK eT9WLGWEMd1pfJF8ILKd8ZsQhiZCVqimBfe9nAG/7qvAGDE+HGwQLMvn83mx/NJrq4Ev 5zcWym4n2yMRWdeUZybIHPni7cwKHb9dF64/n0tsdTyZPPS2Z8TCxVFUKnoVWsDur9Zp ptPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=CEv1ZapaCCzJlhu3VXb8Gy+/C8bmp/LMsyxifo3NOaE=; fh=MSL/7hYF60PaScCJvqqoGkUWoZtElvzu/oEB/jqaobA=; b=ahS/UVkVmc2pJnmSPgkFr3sC5+imEsWNzC0A/phUmYJEYMo8IlbipRh0dyDs4XZReP /qWJh3ozlG0fCoDeYv6ycVNdJRohWIIZ54chm0ZJDYChrxGb8l2RLjXeHbKD731VBulz LcyOUCapzgAFD606rtQDaQZj2j23Q2GTA+EE9NXYnlfUMEgBvFTSEI4BVYCYkLofbPkD zzdclVGI02vNO9+MHVzfVXB0SeTxMGyYKyVhqy8Gf6L+rL/9nRWKj7YV4jKS3oZ3ApXy Oo4p7l7CXcvoiXUmqsR6Xc7k6y6giRxl6V/Gqa4hmOp86hbDqC10R/mn6iKuWTArwRhc IHKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PY6jkODx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h7-20020a1709066d8700b00a2c8272fe53si10506706ejt.880.2024.01.22.07.14.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 07:14:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PY6jkODx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 99A741F21FC1 for ; Mon, 22 Jan 2024 15:14:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29AF5524DB; Mon, 22 Jan 2024 14:58:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PY6jkODx" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C5B2524A9; Mon, 22 Jan 2024 14:58:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935504; cv=none; b=fSD4rTTFc2Iq67AGK4i+J9LLuQthnHul0kY7zDW+8YpGhXxK62hC5nNkkHB6koaKxut49xOerSNCgu+QUdrMF00M7UASFABQ8pQkRDkBhr8nbKuil7RKD222aszpgCVW+y2+HP/qsikTsaqsgePxEOCnGlS170wxcT7FEVT+irE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935504; c=relaxed/simple; bh=xD9xpuiZUPrSvYzQ2YyguGL/6fOMJQL/RT0rBtUxc7A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZYZ3GSYQBzgDM6YnOsBMCxXweakBG9AXFzCvYvTt/0myeRjtwWMz3ZMhKUbvDeEhmDX4d8Jb1y9e8BKk4bFHnCvcma43J1A7MvItnA/Vo/9yCkn0+bpd2VNeQ+7YZhhvkHrhU3Q+3wiFQFPz7fEGgh8vZxs3Gr15UGgT9/NXzxM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PY6jkODx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C47EFC433C7; Mon, 22 Jan 2024 14:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705935503; bh=xD9xpuiZUPrSvYzQ2YyguGL/6fOMJQL/RT0rBtUxc7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PY6jkODxULik0F4bzacQo+s2XHjVPC/+tJKg3M6O8Ah6MqxHZIAbF2a0mMAhpc5Mf Rw9lXX1X7IaO1BGFfBu2/b2rfrEmsOTKh0jLNq2dYkV8360NhfHWq3bqhwEZ84gJuT lAc52HGgLfr4GX40j+9W/kHiNMmgry7ZFxA4JSmqqh9vX9NyhxmZG0uF+xG0KN5KKo xGXtbD3jNMI04dH0rGggyIpgqXPufOmb3yyd6VDEcgHiqStoEvV6SDl8xDXGu9R8IF GEw2+oTDmQ3EIpOBenevabCyoJvfwNHSWn2r2fv/+FNzhNWNSRvLwtuuInjotLj8XT 9myT4CQ3iOWUw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tomi Valkeinen , Adam Ford , Laurent Pinchart , Mauro Carvalho Chehab , Sasha Levin , dafna@fastmail.com, heiko@sntech.de, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 6.7 36/88] media: rkisp1: Fix IRQ handler return values Date: Mon, 22 Jan 2024 09:51:09 -0500 Message-ID: <20240122145608.990137-36-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122145608.990137-1-sashal@kernel.org> References: <20240122145608.990137-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.7.1 Content-Transfer-Encoding: 8bit From: Tomi Valkeinen [ Upstream commit 3eb7910e1b16a2c136be26a8380f21469225b2f6 ] 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. Link: https://lore.kernel.org/r/20231207-rkisp-irq-fix-v3-2-358a2c871a3c@ideasonboard.com Tested-by: Adam Ford #imx8mp-beacon Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c index 4c4514e20673..22b2ae0e89c4 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c @@ -442,17 +442,25 @@ static int rkisp1_entities_register(struct rkisp1_device *rkisp1) static irqreturn_t rkisp1_isr(int irq, void *ctx) { + 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; + 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.43.0