From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Adam Ford <aford173@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sasha Levin <sashal@kernel.org>,
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.6 31/73] media: rkisp1: Store IRQ lines
Date: Mon, 22 Jan 2024 10:01:45 -0500 [thread overview]
Message-ID: <20240122150432.992458-31-sashal@kernel.org> (raw)
In-Reply-To: <20240122150432.992458-1-sashal@kernel.org>
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
[ Upstream commit 0753874617de883c6d4da903142f334f76a75d70 ]
Store the IRQ lines used by the driver for easy access. These are needed
in future patches which fix IRQ race issues.
Link: https://lore.kernel.org/r/20231207-rkisp-irq-fix-v3-3-358a2c871a3c@ideasonboard.com
Tested-by: Adam Ford <aford173@gmail.com> #imx8mp-beacon
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../platform/rockchip/rkisp1/rkisp1-common.h | 11 ++++++++++-
.../media/platform/rockchip/rkisp1/rkisp1-dev.c | 17 +++++++++++++----
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
index d30f0ecb1bfd..104a1dbeff43 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
@@ -61,6 +61,14 @@ struct dentry;
RKISP1_CIF_ISP_EXP_END | \
RKISP1_CIF_ISP_HIST_MEASURE_RDY)
+/* IRQ lines */
+enum rkisp1_irq_line {
+ RKISP1_IRQ_ISP = 0,
+ RKISP1_IRQ_MI,
+ RKISP1_IRQ_MIPI,
+ RKISP1_NUM_IRQS,
+};
+
/* enum for the resizer pads */
enum rkisp1_rsz_pad {
RKISP1_RSZ_PAD_SINK,
@@ -441,7 +449,6 @@ struct rkisp1_debug {
* struct rkisp1_device - ISP platform device
*
* @base_addr: base register address
- * @irq: the irq number
* @dev: a pointer to the struct device
* @clk_size: number of clocks
* @clks: array of clocks
@@ -459,6 +466,7 @@ struct rkisp1_debug {
* @stream_lock: serializes {start/stop}_streaming callbacks between the capture devices.
* @debug: debug params to be exposed on debugfs
* @info: version-specific ISP information
+ * @irqs: IRQ line numbers
*/
struct rkisp1_device {
void __iomem *base_addr;
@@ -479,6 +487,7 @@ struct rkisp1_device {
struct mutex stream_lock; /* serialize {start/stop}_streaming cb between capture devices */
struct rkisp1_debug debug;
const struct rkisp1_info *info;
+ int irqs[RKISP1_NUM_IRQS];
};
/*
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
index 22b2ae0e89c4..c3fa40976140 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
@@ -114,6 +114,7 @@
struct rkisp1_isr_data {
const char *name;
irqreturn_t (*isr)(int irq, void *ctx);
+ u32 line_mask;
};
/* ----------------------------------------------------------------------------
@@ -471,9 +472,9 @@ static const char * const px30_isp_clks[] = {
};
static const struct rkisp1_isr_data px30_isp_isrs[] = {
- { "isp", rkisp1_isp_isr },
- { "mi", rkisp1_capture_isr },
- { "mipi", rkisp1_csi_isr },
+ { "isp", rkisp1_isp_isr, BIT(RKISP1_IRQ_ISP) },
+ { "mi", rkisp1_capture_isr, BIT(RKISP1_IRQ_MI) },
+ { "mipi", rkisp1_csi_isr, BIT(RKISP1_IRQ_MIPI) },
};
static const struct rkisp1_info px30_isp_info = {
@@ -492,7 +493,7 @@ static const char * const rk3399_isp_clks[] = {
};
static const struct rkisp1_isr_data rk3399_isp_isrs[] = {
- { NULL, rkisp1_isr },
+ { NULL, rkisp1_isr, BIT(RKISP1_IRQ_ISP) | BIT(RKISP1_IRQ_MI) | BIT(RKISP1_IRQ_MIPI) },
};
static const struct rkisp1_info rk3399_isp_info = {
@@ -543,6 +544,9 @@ static int rkisp1_probe(struct platform_device *pdev)
if (IS_ERR(rkisp1->base_addr))
return PTR_ERR(rkisp1->base_addr);
+ for (unsigned int il = 0; il < ARRAY_SIZE(rkisp1->irqs); ++il)
+ rkisp1->irqs[il] = -1;
+
for (i = 0; i < info->isr_size; i++) {
irq = info->isrs[i].name
? platform_get_irq_byname(pdev, info->isrs[i].name)
@@ -550,6 +554,11 @@ static int rkisp1_probe(struct platform_device *pdev)
if (irq < 0)
return irq;
+ for (unsigned int il = 0; il < ARRAY_SIZE(rkisp1->irqs); ++il) {
+ if (info->isrs[i].line_mask & BIT(il))
+ rkisp1->irqs[il] = irq;
+ }
+
ret = devm_request_irq(dev, irq, info->isrs[i].isr, 0,
dev_driver_string(dev), dev);
if (ret) {
--
2.43.0
next prev parent reply other threads:[~2024-01-22 15:05 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 15:01 [PATCH AUTOSEL 6.6 01/73] f2fs: fix to check return value of f2fs_reserve_new_block() Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 02/73] ALSA: hda: Refer to correct stream index at loops Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 03/73] ASoC: doc: Fix undefined SND_SOC_DAPM_NOPM argument Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 04/73] drm: Fix color LUT rounding Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 05/73] fast_dput(): handle underflows gracefully Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 06/73] reiserfs: Avoid touching renamed directory if parent does not change Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 07/73] RDMA/IPoIB: Fix error code return in ipoib_mcast_join Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 08/73] ASoC: SOF: icp3-dtrace: Fix wrong kfree() usage Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 09/73] drm/panel-edp: Add override_edid_mode quirk for generic edp Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 10/73] drm/bridge: anx7625: Fix Set HPD irq detect window to 2ms Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 11/73] drm/amd/display: Fix tiled display misalignment Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 12/73] media: renesas: vsp1: Fix references to pad config Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 13/73] f2fs: fix write pointers on zoned device after roll forward Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 14/73] ASoC: amd: Add new dmi entries for acp5x platform Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 15/73] drm/amd/display: Fix MST PBN/X.Y value calculations Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 16/73] drm/amd/display: Fix writeback_info never got updated Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 17/73] drm/amd/display: Fix writeback_info is not removed Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 18/73] drm/drm_file: fix use of uninitialized variable Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 19/73] drm/framebuffer: Fix " Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 20/73] drm/mipi-dsi: Fix detach call without attach Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 21/73] media: stk1160: Fixed high volume of stk1160_dbg messages Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 22/73] media: rockchip: rga: fix swizzling for RGB formats Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 23/73] PCI: add INTEL_HDA_ARL to pci_ids.h Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 24/73] ALSA: hda: Intel: add HDA_ARL PCI ID support Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 25/73] ALSA: hda: intel-dspcfg: add filters for ARL-S and ARL Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 26/73] drm/msm/dp: Add DisplayPort controller for SM8650 Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 27/73] media: uvcvideo: Fix power line control for a Chicony camera Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 28/73] media: uvcvideo: Fix power line control for SunplusIT camera Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 29/73] media: rkisp1: Drop IRQF_SHARED Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 30/73] media: rkisp1: Fix IRQ handler return values Sasha Levin
2024-01-22 15:01 ` Sasha Levin [this message]
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 32/73] media: rkisp1: Fix IRQ disable race issue Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 33/73] media: rkisp1: resizer: Stop manual allocation of v4l2_subdev_state Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 34/73] hwmon: (nct6775) Fix fan speed set failure in automatic mode Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 35/73] hwmon: (pc87360) Bounds check data->innr usage Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 36/73] hwmon: (hp-wmi-sensors) Fix failure to load on EliteDesk 800 G6 Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 37/73] f2fs: fix to tag gcing flag on page during block migration Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 38/73] drm/exynos: Call drm_atomic_helper_shutdown() at shutdown/unbind time Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 39/73] IB/ipoib: Fix mcast list locking Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 40/73] media: amphion: remove mutext lock in condition of wait_event Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 41/73] media: ddbridge: fix an error code problem in ddb_probe Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 42/73] media: i2c: imx335: Fix hblank min/max values Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 43/73] drm/amd/display: For prefetch mode > 0, extend prefetch if possible Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 44/73] drm/amd/display: Force p-state disallow if leaving no plane config Sasha Levin
2024-01-22 15:01 ` [PATCH AUTOSEL 6.6 45/73] drm/amdkfd: fix mes set shader debugger process management Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 46/73] drm/msm/dpu: enable writeback on SM8350 Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 47/73] drm/msm/dpu: enable writeback on SM8450 Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 48/73] drm/msm/dpu: Ratelimit framedone timeout msgs Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 49/73] drm/msm/dpu: fix writeback programming for YUV cases Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 50/73] drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 51/73] clk: hi3620: Fix memory leak in hi3620_mmc_clk_init() Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 52/73] clk: mmp: pxa168: Fix memory leak in pxa168_clk_init() Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 53/73] watchdog: starfive: add lock annotations to fix context imbalances Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 54/73] watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786 Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 55/73] accel/habanalabs: add support for Gaudi2C device Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 56/73] drm/amd/display: make flip_timestamp_in_us a 64-bit variable Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 57/73] drm/amd/display: Only clear symclk otg flag for HDMI Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 58/73] clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 59/73] ALSA: hda/tas2781: add fixup for Lenovo 14ARB7 Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 60/73] drm/amdgpu: Fix ecc irq enable/disable unpaired Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 61/73] drm/amd/display: Fix minor issues in BW Allocation Phase2 Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 62/73] drm/amdgpu: Let KFD sync with VM fences Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 63/73] drm/amd/display: Fixing stream allocation regression Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 64/73] Re-revert "drm/amd/display: Enable Replay for static screen use cases" Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 65/73] drm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()' Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 66/73] drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()' Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 67/73] drm/amdkfd: Fix iterator used outside loop in 'kfd_add_peer_prop()' Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 68/73] Revert "drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole" Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 69/73] drm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 70/73] ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140 Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 71/73] ksmbd: set v2 lease version on lease upgrade Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 72/73] ksmbd: fix potential circular locking issue in smb2_set_ea() Sasha Levin
2024-01-22 15:02 ` [PATCH AUTOSEL 6.6 73/73] ksmbd: send lease break notification on FILE_RENAME_INFORMATION Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240122150432.992458-31-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=aford173@gmail.com \
--cc=dafna@fastmail.com \
--cc=heiko@sntech.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tomi.valkeinen@ideasonboard.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox