FAILED: patch "[PATCH] media: qcom: camss: Fix RDI streaming for CSID 340" failed to apply to 6.18-stable tree
Subsystems (5)
[email protected]
maintainerThe patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x cc1c35619c9895f918f9e388e3caa6ab2ff2fbe7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072933-pungent-everyday-da96@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From cc1c35619c9895f918f9e388e3caa6ab2ff2fbe7 Mon Sep 17 00:00:00 2001
From: Bryan O'Donoghue <[email protected]>
Date: Tue, 7 Apr 2026 11:34:52 +0100
Subject: [PATCH] media: qcom: camss: Fix RDI streaming for CSID 340
Fix streaming from CSIDn RDI1 and RDI2 to VFEn RDI1 and RDI2. A pattern we have replicated throughout CAMSS where we use the VC number to populate both the VC fields and port fields of the CSID means that in practice only VC = 0 on CSIDn:RDI0 to VFEn:RDI0 works.
Fix that for CSID 340 by separating VC and port. Fix to VC zero as a bugfix we will look to properly populate the VC field with follow on patches later.
drivers/media/platform/qcom/camss/camss-csid-340.c +10 -8
@@ -74,9 +74,9 @@ static void __csid_ctrl_rdi(struct csid_device *csid, int enable, u8 rdi)writel_relaxed (!!enable, csid->base +CSID_RDI_CTRL (rdi)); } -static void __csid_configure_rdi_stream (struct csid_device *csid,u8 enable,u8 vc) +static void __csid_configure_rdi_stream (struct csid_device *csid,u8 enable,u8 port,u8 vc) { -struct v4l2_mbus_framefmt *input_format = &csid->fmt[MSM_CSID_PAD_FIRST_SRC + vc]; +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);
@@ -88,14 +88,14 @@ static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8* the four least significant bits of the five bit VC * bitfield to generate an internal CID value. * -* CSID_RDI_CFG0(vc) +* CSID_RDI_CFG0(port) * DT_ID : 28:27 * VC : 26:22 * DT : 21:16 * * CID : VC 3:0 << 2 | DT_ID 1:0 */ - dt_id = vc &0x03 ; + dt_id = port &0x03 ; val =CSID_RDI_CFG0_DECODE_FORMAT_NOP ;/* only for RDI path */ val |=FIELD_PREP (CSID_RDI_CFG0_DT_MASK , format->data_type);
@@ -105,10 +105,11 @@ static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8if (enable) val |=CSID_RDI_CFG0_ENABLE ; -dev_dbg (csid->camss->dev,"CSID%u: Stream %s (dt:0x%x vc=%u)\n" , - csid->id, enable ?"enable" :"disable" , format->data_type, vc); +dev_dbg (csid->camss->dev,"CSID%u: Stream %s (dt:0x%x port=%u vc=%u)\n" , + csid->id, enable ?"enable" :"disable" , format->data_type, + port, vc); -writel_relaxed (val, csid->base +CSID_RDI_CFG0 (vc)); +writel_relaxed (val, csid->base +CSID_RDI_CFG0 (port)); }static void csid_configure_stream (struct csid_device *csid,u8 enable)
@@ -117,9 +118,10 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable)__csid_configure_rx (csid, &csid->phy); +/* 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)) { -__csid_configure_rdi_stream (csid, enable, i); +__csid_configure_rdi_stream (csid, enable, i,0 );__csid_ctrl_rdi (csid, enable, i); } }
Sasha Levin
maintainerPATCH 1/2 media: qcom: camss: csid-340: Fix unused variables
From: Loic Poulain <[email protected]>
[ Upstream commit 0b61ce8dc4a71ea7baa19275c655677c612dde6d ]
The CSID driver has some unused variables and function parameters that are no longer needed (due to refactoring). Clean up those unused elements:
- Remove the vc parameter from __csid_configure_rx().
- Drop the unused lane_cnt variable.
- Adjust call to __csid_configure_rx() accordingly.
Stable-dep-of: cc1c35619c98 ("media: qcom: camss: Fix RDI streaming for CSID 340")
--- drivers/media/platform/qcom/camss/camss-csid-340.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/media/platform/qcom/camss/camss-csid-340.c +3 -7
@@ -55,8 +55,7 @@#define CSID_RDI_CTRL_HALT_AT_FRAME_BOUNDARY 0#define CSID_RDI_CTRL_RESUME_AT_FRAME_BOUNDARY 1 -static void __csid_configure_rx (struct csid_device *csid, -struct csid_phy_config *phy,int vc) +static void __csid_configure_rx (struct csid_device *csid,struct csid_phy_config *phy) {u32 val;
@@ -81,13 +80,9 @@ static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8const struct csid_format_info *format =csid_get_fmt_entry (csid->res->formats->formats, csid->res->formats->nformats, input_format->code); -u8 lane_cnt = csid->phy.lane_cnt;u8 dt_id;u32 val; -if (!lane_cnt) - lane_cnt =4 ; -/* * DT_ID is a two bit bitfield that is concatenated with * the four least significant bits of the five bit VC
@@ -120,10 +115,11 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable) {int i; +__csid_configure_rx (csid, &csid->phy); +for (i =0 ; i <MSM_CSID_MAX_SRC_STREAMS ; i++) {if (csid->phy.en_vc &BIT (i)) {__csid_configure_rdi_stream (csid, enable, i); -__csid_configure_rx (csid, &csid->phy, i);__csid_ctrl_rdi (csid, enable, i); } }
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/2 media: qcom: camss: Fix RDI streaming for CSID 340
From: Bryan O'Donoghue <[email protected]>
[ Upstream commit cc1c35619c9895f918f9e388e3caa6ab2ff2fbe7 ]
Fix streaming from CSIDn RDI1 and RDI2 to VFEn RDI1 and RDI2. A pattern we have replicated throughout CAMSS where we use the VC number to populate both the VC fields and port fields of the CSID means that in practice only VC = 0 on CSIDn:RDI0 to VFEn:RDI0 works.
Fix that for CSID 340 by separating VC and port. Fix to VC zero as a bugfix we will look to properly populate the VC field with follow on patches later.
--- .../media/platform/qcom/camss/camss-csid-340.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/media/platform/qcom/camss/camss-csid-340.c +10 -8
@@ -74,9 +74,9 @@ static void __csid_ctrl_rdi(struct csid_device *csid, int enable, u8 rdi)writel_relaxed (!!enable, csid->base +CSID_RDI_CTRL (rdi)); } -static void __csid_configure_rdi_stream (struct csid_device *csid,u8 enable,u8 vc) +static void __csid_configure_rdi_stream (struct csid_device *csid,u8 enable,u8 port,u8 vc) { -struct v4l2_mbus_framefmt *input_format = &csid->fmt[MSM_CSID_PAD_FIRST_SRC + vc]; +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);
@@ -88,14 +88,14 @@ static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8* the four least significant bits of the five bit VC * bitfield to generate an internal CID value. * -* CSID_RDI_CFG0(vc) +* CSID_RDI_CFG0(port) * DT_ID : 28:27 * VC : 26:22 * DT : 21:16 * * CID : VC 3:0 << 2 | DT_ID 1:0 */ - dt_id = vc &0x03 ; + dt_id = port &0x03 ; val =CSID_RDI_CFG0_DECODE_FORMAT_NOP ;/* only for RDI path */ val |=FIELD_PREP (CSID_RDI_CFG0_DT_MASK , format->data_type);
@@ -105,10 +105,11 @@ static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8if (enable) val |=CSID_RDI_CFG0_ENABLE ; -dev_dbg (csid->camss->dev,"CSID%u: Stream %s (dt:0x%x vc=%u)\n" , - csid->id, enable ?"enable" :"disable" , format->data_type, vc); +dev_dbg (csid->camss->dev,"CSID%u: Stream %s (dt:0x%x port=%u vc=%u)\n" , + csid->id, enable ?"enable" :"disable" , format->data_type, + port, vc); -writel_relaxed (val, csid->base +CSID_RDI_CFG0 (vc)); +writel_relaxed (val, csid->base +CSID_RDI_CFG0 (port)); }static void csid_configure_stream (struct csid_device *csid,u8 enable)
@@ -117,9 +118,10 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable)__csid_configure_rx (csid, &csid->phy); +/* 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)) { -__csid_configure_rdi_stream (csid, enable, i); +__csid_configure_rdi_stream (csid, enable, i,0 );__csid_ctrl_rdi (csid, enable, i); } }
Signature · 1 line
2.53.0