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 2/5] media: qcom: camss: csid-gen2: fix RDI enable bit manipulation
Date: Sun, 22 Nov 2026 14:35:50 +0100 [thread overview]
Message-ID: <20261122-camss-fixes-v1-2-9df4deb87ea2@gmail.com> (raw)
In-Reply-To: <20261122-camss-fixes-v1-0-9df4deb87ea2@gmail.com>
From: Robert Ijtsma <robertijtsma@gmail.com>
In __csid_configure_rdi_stream(), shifting the u8 parameter `enable`
(promoted to signed int) left by RDI_CFG0_ENABLE (31) shifts into the
sign bit, and bitwise ORing never explicitly clears the enable bit when
`enable` is zero.
Use BIT(RDI_CFG0_ENABLE) to explicitly set or clear the bit depending
on `enable`, matching camss-csid-680.c.
Fixes: 729fc005c8e2 ("media: qcom: camss: Split testgen, RDI and RX for CSID 170")
Signed-off-by: Robert Ijtsma <robertijtsma@gmail.com>
---
drivers/media/platform/qcom/camss/camss-csid-gen2.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/camss/camss-csid-gen2.c b/drivers/media/platform/qcom/camss/camss-csid-gen2.c
index eadcb2f..804c8fe 100644
--- a/drivers/media/platform/qcom/camss/camss-csid-gen2.c
+++ b/drivers/media/platform/qcom/camss/camss-csid-gen2.c
@@ -318,7 +318,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-22 13:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 13:35 [PATCH 0/5] media: qcom: camss: fix VFE/CSID/video error handling and register bugs Robert Ijtsma via B4 Relay
2026-11-22 13:35 ` [PATCH 1/5] media: qcom: camss: vfe-17x: check status1 for RDI SOF interrupts Robert Ijtsma via B4 Relay
2026-11-22 13:35 ` Robert Ijtsma via B4 Relay [this message]
2026-11-22 13:35 ` [PATCH 3/5] media: qcom: camss: csid: release parent device on power-on failure Robert Ijtsma via B4 Relay
2026-11-22 13:35 ` [PATCH 4/5] media: qcom: camss: vfe: destroy mutexes after unregistering entities Robert Ijtsma via B4 Relay
2026-11-22 13:35 ` [PATCH 5/5] media: qcom: camss: video: stop started subdevs on start_streaming failure 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=20261122-camss-fixes-v1-2-9df4deb87ea2@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