From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Gjorgji.Rosikopulos.gjorgji.rosikopulos@oss.qualcomm.com,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Loic Poulain <loic.poulain@oss.qualcomm.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Atanas Filipov <atanas.filipov@oss.qualcomm.com>,
Jigarkumar Zala <jigarkumar.zala@oss.qualcomm.com>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Gjorgji Rosikopulos <gjorgji.rosikopulos@oss.qualcomm.com>
Subject: Re: [PATCH 3/8] media: qcom: camss: Implement CSID streams API hw_ops for gen2
Date: Fri, 11 Sep 2026 11:46:12 +0100 [thread overview]
Message-ID: <e3000a66-3fa9-48d6-a82b-b4ff52558e5a@linaro.org> (raw)
In-Reply-To: <20260911062213.195007-4-gjorgji.rosikopulos@oss.qualcomm.com>
On 11/09/2026 07:22,
Gjorgji.Rosikopulos.gjorgji.rosikopulos@oss.qualcomm.com wrote:
> From: Gjorgji Rosikopulos <gjorgji.rosikopulos@oss.qualcomm.com>
>
> Implement the configure_rx/enable_stream/disable_stream hw_ops added to
> struct csid_hw_ops, for the gen2 CSID hardware backend used by SM8250.
>
> __csid_configure_rdi_stream() now takes an explicit data type parameter
> instead of deriving it from the CSID source pad's format, since the
> streams API keys each stream by stream_id rather than by pad. The
> existing configure_stream() path is updated to pass its per-port format
> lookup through to this parameter, preserving current behavior.
>
> Signed-off-by: Gjorgji Rosikopulos <gjorgji.rosikopulos@oss.qualcomm.com>
> ---
> .../platform/qcom/camss/camss-csid-gen2.c | 59 ++++++++++++++++---
> 1 file changed, 51 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss-csid-gen2.c b/drivers/media/platform/qcom/camss/camss-csid-gen2.c
> index eadcb2f7e3aa..2512cdb16d94 100644
> --- a/drivers/media/platform/qcom/camss/camss-csid-gen2.c
> +++ b/drivers/media/platform/qcom/camss/camss-csid-gen2.c
> @@ -253,13 +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, u8 enable, u8 port, u8 vc, u8 dt)
> {
> - /* 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];
> - const struct csid_format_info *format = csid_get_fmt_entry(csid->res->formats->formats,
> - csid->res->formats->nformats,
> - input_format->code);
> u32 val;
>
> /*
> @@ -281,7 +276,7 @@ static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8
> val |= 1 << RDI_CFG0_TIMESTAMP_EN;
> /* note: for non-RDI path, this should be format->decode_format */
> val |= DECODE_FORMAT_PAYLOAD_ONLY << RDI_CFG0_DECODE_FORMAT;
> - val |= format->data_type << RDI_CFG0_DATA_TYPE;
> + val |= dt << RDI_CFG0_DATA_TYPE;
> val |= vc << RDI_CFG0_VIRTUAL_CHANNEL;
> val |= dt_id << RDI_CFG0_DT_ID;
> writel_relaxed(val, csid->base + CSID_RDI_CFG0(port));
> @@ -330,15 +325,60 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable)
> /* Loop through all enabled ports and configure a stream for each */
> for (i = 0; i < MSM_CSID_MAX_SRC_STREAMS; i++)
> if (csid->phy.en_vc & BIT(i)) {
> + /* Source pads match RDI channels: pad 1 -> RDI0, pad 2 -> RDI1, etc. */
> + struct v4l2_mbus_framefmt *input_format =
> + &csid->fmt[MSM_CSID_PAD_FIRST_SRC + i];
> + const struct csid_format_info *format =
> + csid_get_fmt_entry(csid->res->formats->formats,
> + csid->res->formats->nformats,
> + input_format->code);
> + u8 vc = 0;
> +
> if (tg->enabled)
> __csid_configure_testgen(csid, enable, i, 0);
>
> - __csid_configure_rdi_stream(csid, enable, i, 0);
> + __csid_configure_rdi_stream(csid, enable, i, vc, format->data_type);
> __csid_configure_rx(csid, &csid->phy, 0);
> __csid_ctrl_rdi(csid, enable, i);
> }
> }
>
> +/*
> + * configure_rx - Configure the CSID Rx front-end
> + */
> +static void csid_configure_rx(struct csid_device *csid)
> +{
> + __csid_configure_rx(csid, &csid->phy, 0);
> +}
> +
> +/*
> + * stream_id is used directly as the hardware RDI port index below. This
> + * assumes a 1:1 stream-to-port mapping and should be revisited once
> + * per-platform src_streams data (stream id -> hw pipe) is added.
> + */
> +static void csid_enable_stream(struct csid_device *csid, u32 stream_id, u8 vc, u8 dt)
> +{
> + struct csid_testgen_config *tg = &csid->testgen;
> +
> + if (tg->enabled)
> + __csid_configure_testgen(csid, 1, stream_id, vc);
> +
> + __csid_configure_rdi_stream(csid, 1, stream_id, vc, dt);
> + __csid_ctrl_rdi(csid, 1, stream_id);
> +}
> +
> +static void csid_disable_stream(struct csid_device *csid, u32 stream_id)
> +{
> + struct csid_testgen_config *tg = &csid->testgen;
> +
> + __csid_ctrl_rdi(csid, 0, stream_id);
> +
> + if (tg->enabled)
> + __csid_configure_testgen(csid, 0, stream_id, 0);
> +
> + __csid_configure_rdi_stream(csid, 0, stream_id, 0, 0);
> +}
> +
> static int csid_configure_testgen_pattern(struct csid_device *csid, s32 val)
> {
> if (val > 0 && val <= csid->testgen.nmodes)
> @@ -425,6 +465,9 @@ static void csid_subdev_init(struct csid_device *csid)
> const struct csid_hw_ops csid_ops_gen2 = {
> .configure_stream = csid_configure_stream,
> .configure_testgen_pattern = csid_configure_testgen_pattern,
> + .configure_rx = csid_configure_rx,
Keep the namespace consistent and include _stream somewhere in this name
> + .enable_stream = csid_enable_stream,
> + .disable_stream = csid_disable_stream,
> .hw_version = csid_hw_version,
> .isr = csid_isr,
> .reset = csid_reset,
next prev parent reply other threads:[~2026-09-11 10:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 6:22 [PATCH 0/8] media: qcom: camss: add V4L2 subdev streams API support Gjorgji.Rosikopulos.gjorgji.rosikopulos
2026-09-11 6:22 ` [PATCH 1/8] media: qcom: camss: Add streams API support for CSIPHY Gjorgji.Rosikopulos.gjorgji.rosikopulos
2026-09-11 10:37 ` Bryan O'Donoghue
2026-09-11 13:00 ` Gjorgji Rosikopulos (Consultant)
2026-09-11 6:22 ` [PATCH 2/8] media: qcom: camss: Add streams API hw_ops to CSID interface Gjorgji.Rosikopulos.gjorgji.rosikopulos
2026-09-11 10:43 ` Bryan O'Donoghue
2026-09-11 14:05 ` Gjorgji Rosikopulos (Consultant)
2026-09-11 6:22 ` [PATCH 3/8] media: qcom: camss: Implement CSID streams API hw_ops for gen2 Gjorgji.Rosikopulos.gjorgji.rosikopulos
2026-09-11 10:46 ` Bryan O'Donoghue [this message]
2026-09-11 14:08 ` Gjorgji Rosikopulos (Consultant)
2026-09-11 13:30 ` Loic Poulain
2026-09-11 14:17 ` Gjorgji Rosikopulos (Consultant)
2026-09-12 5:34 ` Gjorgji Rosikopulos (Consultant)
2026-09-11 6:22 ` [PATCH 4/8] media: qcom: camss: Add streams API support in CSID subdevice Gjorgji.Rosikopulos.gjorgji.rosikopulos
2026-09-11 11:35 ` Bryan O'Donoghue
2026-09-11 14:33 ` Gjorgji Rosikopulos (Consultant)
2026-09-11 6:22 ` [PATCH 5/8] media: qcom: camss: Fix CSID-to-VFE all-to-all link crossbar on sm8250 Gjorgji.Rosikopulos.gjorgji.rosikopulos
2026-09-11 11:37 ` Bryan O'Donoghue
2026-09-11 14:37 ` Gjorgji Rosikopulos (Consultant)
2026-09-11 6:22 ` [PATCH 6/8] media: qcom: camss: add streams API support for VFE Gjorgji.Rosikopulos.gjorgji.rosikopulos
2026-09-11 6:22 ` [PATCH 7/8] media: qcom: camss: add streams API support in camss-video Gjorgji.Rosikopulos.gjorgji.rosikopulos
2026-09-11 6:22 ` [PATCH 8/8] media: qcom: camss: enable streams API on SM8250 Gjorgji.Rosikopulos.gjorgji.rosikopulos
2026-09-11 10:19 ` [PATCH 0/8] media: qcom: camss: add V4L2 subdev streams API support Bryan O'Donoghue
2026-09-11 12:55 ` Gjorgji Rosikopulos (Consultant)
2026-09-15 12:15 ` Hitesh Patel
2026-09-15 12:15 ` [PATCH 1/2] media: qcom: camss: Do not link CSID source pads the CSID does not have Hitesh Patel
2026-09-15 12:15 ` [PATCH 2/2] media: qcom: camss: Enable the streams API on SC7280 Hitesh Patel
2026-09-16 8:08 ` Bryan O'Donoghue
2026-09-16 8:31 ` Hitesh Patel
2026-09-16 5:53 ` [PATCH v2 0/2] media: qcom: camss: SC7280 fixes for the streams API series Hitesh Patel
2026-09-16 5:53 ` [PATCH v2 1/2] media: qcom: camss: Do not link CSID source pads the CSID does not have Hitesh Patel
2026-09-16 5:53 ` [PATCH v2 2/2] media: qcom: camss: Enable the streams API on SC7280 Hitesh Patel
2026-09-16 6:54 ` [PATCH v3 0/2] media: qcom: camss: SC7280 fixes for the streams API series Hitesh Patel
2026-09-16 6:54 ` [PATCH v3 1/2] media: qcom: camss: Do not link CSID source pads the CSID does not have Hitesh Patel
2026-09-16 6:54 ` [PATCH v3 2/2] media: qcom: camss: Enable the streams API on SC7280 Hitesh Patel
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=e3000a66-3fa9-48d6-a82b-b4ff52558e5a@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=Gjorgji.Rosikopulos.gjorgji.rosikopulos@oss.qualcomm.com \
--cc=atanas.filipov@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=gjorgji.rosikopulos@oss.qualcomm.com \
--cc=jigarkumar.zala@oss.qualcomm.com \
--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=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®