From: Robert Ijtsma via B4 Relay <devnull+robertijtsma.gmail.com@kernel.org>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Loic Poulain <loic.poulain@oss.qualcomm.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Robert Ijtsma <robertijtsma@gmail.com>
Subject: [PATCH v2 2/5] media: qcom: camss: csid-gen2: fix RDI enable bit manipulation
Date: Tue, 24 Nov 2026 00:43:54 +0100 [thread overview]
Message-ID: <20261124-camss-fixes-v2-2-231a5523cd59@gmail.com> (raw)
In-Reply-To: <20261124-camss-fixes-v2-0-231a5523cd59@gmail.com>
From: Robert Ijtsma <robertijtsma@gmail.com>
In __csid_configure_rdi_stream(), bitwise ORing `enable << RDI_CFG0_ENABLE`
into `val` never clears the enable bit when `enable` is zero.
Change `enable` to bool and explicitly set or clear BIT(RDI_CFG0_ENABLE)
depending on `enable`, matching camss-csid-680.c.
Fixes: 729fc005c8e2 ("media: qcom: camss: Split testgen, RDI and RX for CSID 170")
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Robert Ijtsma <robertijtsma@gmail.com>
---
drivers/media/platform/qcom/camss/camss-csid-gen2.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss-csid-gen2.c b/drivers/media/platform/qcom/camss/camss-csid-gen2.c
index eadcb2f..57ccfeb 100644
--- a/drivers/media/platform/qcom/camss/camss-csid-gen2.c
+++ b/drivers/media/platform/qcom/camss/camss-csid-gen2.c
@@ -253,7 +253,8 @@ static void __csid_configure_testgen(struct csid_device *csid, u8 enable, u8 por
writel_relaxed(val, csid->base + CSID_TPG_CTRL);
}
-static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8 port, u8 vc)
+static void __csid_configure_rdi_stream(struct csid_device *csid, bool enable,
+ u8 port, u8 vc)
{
/* Source pads matching RDI channels on hardware. Pad 1 -> RDI0, Pad 2 -> RDI1, etc. */
struct v4l2_mbus_framefmt *input_format = &csid->fmt[MSM_CSID_PAD_FIRST_SRC + port];
@@ -318,7 +319,10 @@ static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8
writel_relaxed(val, csid->base + CSID_RDI_CTRL(port));
val = readl_relaxed(csid->base + CSID_RDI_CFG0(port));
- val |= enable << RDI_CFG0_ENABLE;
+ if (enable)
+ val |= BIT(RDI_CFG0_ENABLE);
+ else
+ val &= ~BIT(RDI_CFG0_ENABLE);
writel_relaxed(val, csid->base + CSID_RDI_CFG0(port));
}
--
2.56.0
next prev parent reply other threads:[~2026-11-23 23:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 23:43 [PATCH v2 0/5] media: qcom: camss: fix VFE/CSID/video error handling and register bugs Robert Ijtsma via B4 Relay
2026-11-23 23:43 ` [PATCH v2 1/5] media: qcom: camss: vfe-17x: check status1 for RDI SOF interrupts Robert Ijtsma via B4 Relay
2026-11-23 23:43 ` Robert Ijtsma via B4 Relay [this message]
2026-11-23 23:43 ` [PATCH v2 3/5] media: qcom: camss: csid: release parent device on power-on failure Robert Ijtsma via B4 Relay
2026-11-23 23:43 ` [PATCH v2 4/5] media: qcom: camss: vfe: destroy mutexes after unregistering entities Robert Ijtsma via B4 Relay
2026-11-23 23:43 ` [PATCH v2 5/5] media: qcom: camss: video: factor pipeline stream start/stop into helper Robert Ijtsma via B4 Relay
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=20261124-camss-fixes-v2-2-231a5523cd59@gmail.com \
--to=devnull+robertijtsma.gmail.com@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=mchehab@kernel.org \
--cc=robertijtsma@gmail.com \
--cc=vladimir.zapolskiy@linaro.org \
/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