mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bryan.odonoghue@linaro.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,
	 linux-kernel@vger.kernel.org, Bryan O'Donoghue <bod@kernel.org>
Subject: [PATCH 07/14] media: qcom: camss: csid-680: Enable RDI SOF tracking
Date: Thu, 29 Oct 2026 09:55:16 +0000	[thread overview]
Message-ID: <20261029-v4l2-frame-sync-v1-7-d37992559c58@kernel.org> (raw)
In-Reply-To: <20261029-v4l2-frame-sync-v1-0-d37992559c58@kernel.org>

From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Similarly to the sm8650 we can quite easily switch on V4L2_EVENT_FRAME_SYNC
for x1e/x2e which uses csid-680.

Do so now.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/media/platform/qcom/camss/camss-csid-680.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/media/platform/qcom/camss/camss-csid-680.c b/drivers/media/platform/qcom/camss/camss-csid-680.c
index 345a67c8fb947..452640e72f6d5 100644
--- a/drivers/media/platform/qcom/camss/camss-csid-680.c
+++ b/drivers/media/platform/qcom/camss/camss-csid-680.c
@@ -296,6 +296,20 @@ static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8
 	writel(val, csid->base + CSID_RDI_CFG0(port));
 }
 
+static void __csid_configure_rdi_irq(struct csid_device *csid, u8 enable, u8 rdi)
+{
+	u32 val;
+
+	val = readl(csid->base + CSID_CSI2_RDIN_IRQ_MASK(rdi));
+
+	if (enable)
+		val |= CSID_CSI2_RDIN_INFO_INPUT_SOF;
+	else
+		val &= ~CSID_CSI2_RDIN_INFO_INPUT_SOF;
+
+	writel(val, csid->base + CSID_CSI2_RDIN_IRQ_MASK(rdi));
+}
+
 static void csid_configure_stream(struct csid_device *csid, u8 enable)
 {
 	int i;
@@ -307,6 +321,7 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable)
 		if (csid->phy.en_vc & BIT(i)) {
 			__csid_configure_rdi_stream(csid, enable, i, 0);
 			__csid_configure_rx(csid, &csid->phy, 0);
+			__csid_configure_rdi_irq(csid, enable, i);
 			__csid_ctrl_rdi(csid, enable, i);
 		}
 	}
@@ -395,6 +410,9 @@ static irqreturn_t csid_isr(int irq, void *dev)
 		if (val)
 			writel(val, csid->base + CSID_CSI2_RDIN_IRQ_CLEAR(i));
 
+		if (val & CSID_CSI2_RDIN_INFO_INPUT_SOF)
+			csid_sof_event(csid, i);
+
 		if (val & CSID_CSI2_RDIN_RUP_DONE)
 			csid_rup_complete(csid, i);
 

-- 
2.56.0


  parent reply	other threads:[~2026-10-29  9:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29  9:55 [PATCH 00/14] Add SOF/EOF sequence logic bryan.odonoghue
2026-10-29  9:55 ` [PATCH 01/14] media: qcom: camss: Introduce CPU latency QoS during streaming bryan.odonoghue
2026-10-29 10:10   ` Loic Poulain
2026-10-29 11:03     ` Bryan O'Donoghue
2026-10-29  9:55 ` [PATCH 02/14] media: qcom: camss: vfe: Add eof_seq to vfe_line bryan.odonoghue
2026-10-29  9:55 ` [PATCH 03/14] media: qcom: camss: Introduce SOF sequence tracking bryan.odonoghue
2026-10-29  9:55 ` [PATCH 04/14] media: qcom: camss: Introduce EOF " bryan.odonoghue
2026-10-29  9:55 ` [PATCH 05/14] media: qcom: camss: csid-gen3: Enable RDI SOF driving bryan.odonoghue
2026-10-29 15:43   ` Loic Poulain
2026-10-29 15:46     ` Loic Poulain
2026-10-29 15:49       ` Bryan O'Donoghue
2026-10-29 16:25         ` Gjorgji Rosikopulos (Consultant)
2026-10-29 16:36           ` Loic Poulain
2026-10-29 15:47     ` Bryan O'Donoghue
2026-10-29  9:55 ` [PATCH 06/14] media: qcom: camss: csid-gen3: Enable RDI EOF tracking bryan.odonoghue
2026-10-29  9:55 ` bryan.odonoghue [this message]
2026-10-29  9:55 ` [PATCH 08/14] media: qcom: camss: csid-680: " bryan.odonoghue
2026-10-29  9:55 ` [PATCH 09/14] media: qcom: camss: csid-gen2: Enable RDI SOF tracking bryan.odonoghue
2026-10-29  9:55 ` [PATCH 10/14] media: qcom: camss: csid-gen2: Enable RDI EOF tracking bryan.odonoghue
2026-10-29  9:55 ` [PATCH 11/14] media: qcom: camss: Switch on frame_sync_en logic for sm8650 bryan.odonoghue
2026-10-29  9:55 ` [PATCH 12/14] media: qcom: camss: Switch on frame_sync_en for x1e/x2e bryan.odonoghue
2026-10-29  9:55 ` [PATCH 13/14] media: qcom: camss: Switch on frame_sync_en for sm8250 bryan.odonoghue
2026-10-29  9:55 ` [PATCH 14/14] media: qcom: camss: Switch on frame_sync_en for sdm845 bryan.odonoghue
2026-10-29 13:28 ` [PATCH 00/14] Add SOF/EOF sequence logic Gjorgji Rosikopulos (Consultant)
2026-10-29 14:44   ` Bryan O'Donoghue
2026-10-29 14:51     ` Gjorgji Rosikopulos (Consultant)

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=20261029-v4l2-frame-sync-v1-7-d37992559c58@kernel.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=bod@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=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®