From: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>
To: bryan.odonoghue@linaro.org,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Loic Poulain <loic.poulain@oss.qualcomm.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, Bryan O'Donoghue <bod@kernel.org>,
Vikram Sharma <vikram.sharma@oss.qualcomm.com>,
Suresh Vankadara <svankada@qti.qualcomm.com>
Subject: Re: [PATCH v2 2/3] media: qcom: camss: csid: Stop using csid->id as both index and identifier
Date: Fri, 27 Nov 2026 16:47:18 +0530 [thread overview]
Message-ID: <34619214-35bc-4ac3-8eb4-92b9d3e1bc1e@oss.qualcomm.com> (raw)
In-Reply-To: <20261127-camss-routing-fixes-v2-2-b7152f0af49a@kernel.org>
On 27-11-2026 09:45, bryan.odonoghue@linaro.org wrote:
> From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>
> We have thus far used csid->id as both a hardware identifier and as an
> index to the array of CSI devices.
>
> This is obviously not correct, but has thus far not been obviously
> damaging. Removing a piece of dark silicon CSID2 on x1e80100 we see that
> the reliance of csid->id as both hardware id and index is a brittle
> happenstance.
>
> A previous patch enumerated a .id field in the CSID resources structure.
> The purpose of the id field is to denote hardware identifier.
>
> Instead of maintaining both an hw_id and index field in the CSI
> data-structure pass the struct resource field to csid->id.
>
> Use helper functions from a previous commit to differentiate between CSID
> hardware-id and CSID index where appropriate.
>
> A level of granularity doing csid_index() and csid_hwid() in separate
> patches wouldn't work as we need to change the subdev_init() index and the
> meaning of that index atomically.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>
Tested-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com> # Monaco EVK
> ---
> .../media/platform/qcom/camss/camss-csid-1080.c | 2 +-
> drivers/media/platform/qcom/camss/camss-csid-340.c | 6 ++--
> drivers/media/platform/qcom/camss/camss-csid-680.c | 4 +--
> .../media/platform/qcom/camss/camss-csid-gen3.c | 4 +--
> drivers/media/platform/qcom/camss/camss-csid.c | 34 +++++++++++++++-------
> drivers/media/platform/qcom/camss/camss-csid.h | 17 +++++++++++
> drivers/media/platform/qcom/camss/camss-csiphy.c | 2 +-
> drivers/media/platform/qcom/camss/camss.c | 3 +-
> 8 files changed, 51 insertions(+), 21 deletions(-)
>
...
--
Regards,
Nihal Kumar Gupta
next prev parent reply other threads:[~2026-11-27 11:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 4:15 [PATCH v2 0/3] media: qcom: camss: Two routing fixes bryan.odonoghue
2026-11-27 4:15 ` [PATCH v2 1/3] media: qcom: camss: csid: Add and enumerate an id field for CSID entries bryan.odonoghue
2026-11-27 4:15 ` [PATCH v2 2/3] media: qcom: camss: csid: Stop using csid->id as both index and identifier bryan.odonoghue
2026-11-27 11:17 ` Nihal Kumar Gupta [this message]
2026-11-27 4:15 ` [PATCH v2 3/3] media: qcom: camss: x1e80100: Fix CSID2 routing to nowhere bryan.odonoghue
2026-11-27 4:57 ` [PATCH v2 0/3] media: qcom: camss: Two routing fixes Wenmeng Liu
2026-11-27 8:38 ` Wenmeng Liu
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=34619214-35bc-4ac3-8eb4-92b9d3e1bc1e@oss.qualcomm.com \
--to=nihal.gupta@oss.qualcomm.com \
--cc=bod@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=hverkuil@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=mchehab@kernel.org \
--cc=svankada@qti.qualcomm.com \
--cc=vikram.sharma@oss.qualcomm.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
all inboxes | Powered by JetHome®