mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: "Gjorgji Rosikopulos (Consultant)"
	<gjorgji.rosikopulos@oss.qualcomm.com>,
	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
Subject: Re: [PATCH v2 2/9] media: qcom: camss: Introduce SOF sequence tracking
Date: Tue, 3 Nov 2026 12:19:45 +0000	[thread overview]
Message-ID: <7f3e822e-3749-41c5-8390-e6d74b203927@kernel.org> (raw)
In-Reply-To: <8196a664-f73b-4da1-aea0-0ea49676a4eb@oss.qualcomm.com>

On 03/11/2026 07:11, Gjorgji Rosikopulos (Consultant) wrote:
>> +
>> +void csid_sof_event(struct csid_device *csid, unsigned int id)
>> +{
>> +	struct v4l2_event event = {
>> +		.type = V4L2_EVENT_FRAME_SYNC,
>> +		.id = id,
>> +		.u.frame_sync.frame_sequence =
>> +			atomic_inc_return(&csid->sof_seq[id]),
>> +	};
> On first look this was looking strange because the id is used for the
> control id events not for frame sync. But on second thought it may make
> sense, but the question is how the userspace should interpret those ids?
> As of today userspace does not have any info for the VC and csid internal
> pipelines (so called lines). So with the current state of the code
> the id is VC which makes sense becouse the SOF/EOF packets are recieved
> based on VC. So i am thinking of two options:

The id is not the VC its the CSID:id/port/line-number. VCs don't change 
what this means; its the SOF event as seen by the CSI decoder - inside 
of which there may be multiple VC:DT combos.

This is also the case for PIX which is just another CSID 
port/id/line-number.

> 
> 1. Move SOF event in vfe (rdi/pix sub-devs) we have per line sub-device
>     and will be well known to userspace for which line is reported.
> 
> 2. Add and propose extension of videodev2 documentation that
>     id of frame_sync event types represents SOF per virtual channel.
> 
> Personally i votoe for (1) because it will well fit with stream-api
> support and usespace will have clear understanding of the SOF to which
> stream belongs.

You know from the media graph which CSID drives which VFE:output so it 
is 100% possible to know which CSID:SOF relates to which VFE always. 
CSID::SOF is a hardware description of what the CSID decoder sees. I 
don't support mis-reporting it as a VFE event TBH.

More than that though, there is in-fact a VFE specific SOF/EOF and EPOCH 
event but these require the CSID feeding a frame into the VFE pipeline 
and the VFE moving through its own state-machine to process that frame.

So they are separate signals and separate logical events representing 
different things with different timings in hardware, meaning different 
things to userspace.

CSID:SOF is the thing you want to trigger off of if you are for example 
trying to align an IMU timestamp, not VFE SOF.

Feel free to propose VFE:SOF/EOF if it makes sense for VCs - I don't 
think I have a clear picture of what you want to do there - interested 
though.

---
bod

  parent reply	other threads:[~2026-11-03 12:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 13:56 [PATCH v2 0/9] Add SOF sequence logic bryan.odonoghue
2026-11-02 13:56 ` [PATCH v2 1/9] media: qcom: camss: Introduce CPU latency QoS during streaming bryan.odonoghue
2026-11-02 14:20   ` Loic Poulain
2026-11-02 13:56 ` [PATCH v2 2/9] media: qcom: camss: Introduce SOF sequence tracking bryan.odonoghue
2026-11-02 14:47   ` Loic Poulain
2026-11-03  7:11   ` Gjorgji Rosikopulos (Consultant)
2026-11-03  9:33     ` Loic Poulain
2026-11-03  9:42       ` Gjorgji Rosikopulos (Consultant)
2026-11-03  9:53         ` Loic Poulain
2026-11-03  9:56           ` Loic Poulain
2026-11-03 10:26             ` Gjorgji Rosikopulos (Consultant)
2026-11-03 12:19     ` Bryan O'Donoghue [this message]
2026-11-03 12:30       ` Gjorgji Rosikopulos (Consultant)
2026-11-03 13:13         ` Gjorgji Rosikopulos (Consultant)
2026-11-03 13:27           ` Bryan O'Donoghue
2026-11-03 14:35             ` Gjorgji Rosikopulos (Consultant)
2026-11-03 14:39               ` Bryan O'Donoghue
2026-11-03 14:54                 ` Gjorgji Rosikopulos (Consultant)
2026-11-02 13:56 ` [PATCH v2 3/9] media: qcom: camss: Use SOF sequence tracking for vb.sequence bryan.odonoghue
2026-11-02 14:55   ` Loic Poulain
2026-11-02 13:56 ` [PATCH v2 4/9] media: qcom: camss: csid-gen3: Enable RDI SOF driving bryan.odonoghue
2026-11-02 15:10   ` Loic Poulain
2026-11-02 13:56 ` [PATCH v2 5/9] media: qcom: camss: csid-680: Enable RDI SOF tracking bryan.odonoghue
2026-11-02 15:11   ` Loic Poulain
2026-11-02 13:56 ` [PATCH v2 6/9] media: qcom: camss: csid-gen2: " bryan.odonoghue
2026-11-02 15:18   ` Loic Poulain
2026-11-02 13:56 ` [PATCH v2 7/9] media: qcom: camss: Switch on frame_sync_en logic for csid-gen3 bryan.odonoghue
2026-11-02 13:56 ` [PATCH v2 8/9] media: qcom: camss: Switch on frame_sync_en for x1e/x2e bryan.odonoghue
2026-11-02 14:32   ` Konrad Dybcio
2026-11-02 15:54     ` Bryan O'Donoghue
2026-11-02 15:55       ` Bryan O'Donoghue
2026-11-02 13:56 ` [PATCH v2 9/9] media: qcom: camss: Switch on frame_sync_en for csid-gen2 bryan.odonoghue

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=7f3e822e-3749-41c5-8390-e6d74b203927@kernel.org \
    --to=bod@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=gjorgji.rosikopulos@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®