From: "Gjorgji Rosikopulos (Consultant)" <gjorgji.rosikopulos@oss.qualcomm.com>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 0/6] media: qcom: camss: Report the hardware SOF timestamp
Date: Wed, 25 Nov 2026 11:01:06 +0200 [thread overview]
Message-ID: <0c0b3af6-4fea-422a-a7dc-76e36a3f5db4@oss.qualcomm.com> (raw)
In-Reply-To: <20261123-camss-hw-ts-v1-0-7b62dda6d7a9@oss.qualcomm.com>
Hi Loic,
On 11/23/2026 7:16 PM, Loic Poulain wrote:
> The CAMSS CSID latches the ARM architected counter on every start of
> frame. This series exposes that time to userspace, both through the
> V4L2_EVENT_FRAME_SYNC event and as the buffer timestamp.
>
> Until now both were taken when the interrupt was handled, or worse, when
> the frame had finished being written out to memory, which is about a
> frame period late. The hardware value is free of interrupt latency and
> is directly comparable with CLOCK_MONOTONIC, so it can be correlated
> with other timestamped data such as IMU samples.
Directly comparable with CLOCK_MONOTONIC, does this means
that csid timestamp is in monotonic time domain?
In camss video the flag V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC so either we need
to provide timestamp in that domain or convert in the driver.
~Gjorgji
>
> Patch 1 lets a driver fill in the timestamp of a V4L2 event instead of
> having the core take it. Patch 2 passes the SOF time down to the common
> CSID event helper and adds the counter to CLOCK_MONOTONIC conversion.
> Patches 3 to 5 read the registers on csid-340 and csid-gen2. Patch 6
> uses the same time to stamp the captured buffers.
>
> Patches 4 and 5 are picked from the timestamp support Bryan shared
> earlier, with patch 5 adapted to use the conversion helper added in
> patch 2 rather than its own.
>
> Tested on QCM2290 (Arduino UNO Q) with an IMX219 sensor.
>
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
> Bryan O'Donoghue (2):
> media: camss: Define timestamp registers for csid-gen2
> media: camss: csid-gen2: Report the hardware SOF timestamp
>
> Loic Poulain (4):
> media: v4l2-event: Allow drivers to provide the event timestamp
> media: qcom: camss: csid: Pass the SOF time to csid_sof_event()
> media: qcom: camss: csid-340: Report the hardware SOF timestamp
> media: qcom: camss: Timestamp buffers at start of frame
>
> drivers/media/platform/qcom/camss/camss-csid-340.c | 37 ++++++++--
> drivers/media/platform/qcom/camss/camss-csid-680.c | 2 +-
> .../media/platform/qcom/camss/camss-csid-gen2.c | 32 ++++++++-
> .../media/platform/qcom/camss/camss-csid-gen3.c | 2 +-
> drivers/media/platform/qcom/camss/camss-csid.c | 81 +++++++++++++++++++++-
> drivers/media/platform/qcom/camss/camss-csid.h | 25 ++++++-
> drivers/media/platform/qcom/camss/camss-vfe-17x.c | 7 +-
> drivers/media/platform/qcom/camss/camss-vfe.c | 8 ++-
> drivers/media/platform/qcom/camss/camss-vfe.h | 1 +
> drivers/media/v4l2-core/v4l2-event.c | 20 +++++-
> include/media/v4l2-event.h | 9 ++-
> 11 files changed, 205 insertions(+), 19 deletions(-)
> ---
> base-commit: 2ad58ca589da80990b7afbcff018777851577f89
> change-id: 20261123-camss-hw-ts-e0297adb69d9
>
> Best regards,
next prev parent reply other threads:[~2026-11-25 9:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 17:16 Loic Poulain
2026-11-23 17:16 ` [PATCH 1/6] media: v4l2-event: Allow drivers to provide the event timestamp Loic Poulain
2026-11-23 17:16 ` [PATCH 2/6] media: qcom: camss: csid: Pass the SOF time to csid_sof_event() Loic Poulain
2026-11-24 9:56 ` Bryan O'Donoghue
2026-11-23 17:16 ` [PATCH 3/6] media: qcom: camss: csid-340: Report the hardware SOF timestamp Loic Poulain
2026-11-24 9:57 ` Bryan O'Donoghue
2026-11-24 12:20 ` Loic Poulain
2026-11-24 12:28 ` Bryan O'Donoghue
2026-11-24 12:35 ` Bryan O'Donoghue
2026-11-23 17:16 ` [PATCH 4/6] media: camss: Define timestamp registers for csid-gen2 Loic Poulain
2026-11-23 17:16 ` [PATCH 5/6] media: camss: csid-gen2: Report the hardware SOF timestamp Loic Poulain
2026-11-23 17:16 ` [PATCH 6/6] media: qcom: camss: Timestamp buffers at start of frame Loic Poulain
2026-11-24 9:59 ` [PATCH 0/6] media: qcom: camss: Report the hardware SOF timestamp Bryan O'Donoghue
2026-11-24 10:21 ` Loic Poulain
2026-11-24 10:24 ` Loic Poulain
2026-11-24 11:47 ` Bryan O'Donoghue
2026-11-25 9:01 ` Gjorgji Rosikopulos (Consultant) [this message]
2026-11-25 9:12 ` Loic Poulain
2026-11-25 9:19 ` 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=0c0b3af6-4fea-422a-a7dc-76e36a3f5db4@oss.qualcomm.com \
--to=gjorgji.rosikopulos@oss.qualcomm.com \
--cc=bryan.odonoghue@linaro.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®