From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Jai Luthra <jai.luthra@ideasonboard.com>
Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: Re: [PATCH] media: Documentation: Fix frame interval calculation for raw camera sensors
Date: Tue, 24 Feb 2026 10:39:39 +0200 [thread overview]
Message-ID: <aZ1jy6QIdNqYgDXa@kekkonen.localdomain> (raw)
In-Reply-To: <177191073323.14753.12002575507884033868@freya>
Hi Jai,
On Tue, Feb 24, 2026 at 10:55:33AM +0530, Jai Luthra wrote:
> > LLP = (analog_crop_width + HBLANK) / binning_timing_h
> > FLL = (analog_crop_height + VBLANK) / binning_timing_v
> > frame_interval = LLP * FLL / pixel_rate
> >
> > I'm not 100% sure this is correct however, as the blankings should be
> > expressed on a different clock domain that the pixel sampling rate,
> > but I guess this is a reasonable approximation ?
>
> What does these two extra controls really offer us?
The conclusion earlier on (well, maybe 10 years ago?) was that we should
have had these to begin with, and not to use the blanking values to control
the frame rate, largely because it requires a reference rectangle -- and
the current drivers use a wrong one, mostly because the API doesn't offer
the right one. The assumption back then was that everything would soon be
SMIA (or now CCS) compliant so this wouldn't matter much. But here we
are...
The VBLANK and HBLANK controls effectively also use the wrong reference
(output size) in most drivers and that can't really be changed meaningfully
without breaking things.
>
> All sensors we have seen thus far map their LLP/FLL (or equivalent HTOT/VTOT)
> values with respect to the digital readout, and not the analogue pixel array.
>
> If we add these two controls, we will have to support two different models for
> frame interval calculation in the application layer too. Which I'm fine with if
> it has a practical benefit, that is, it makes it easier to deal with some
> particular sensor.
There are three models, effectively:
1. CCS, where vblank and hblank are related to analogue crop rectangle, as in
hardware;
2. Common raw sensor model, with LLP and FLL; and
3. the rest of the existing drivers (vblank and hblank relative to format
on source pad).
In the case of frame length vs. blanking, I'd presume the difference in the
user space will be relatively small.
>
> And if exposing the LLP/FLL directly offer the same benefit, then that is
> cleaner, as it leaves the HBLANK/VBLANK as-is in the new model.
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2026-02-24 8:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 7:50 Jai Luthra
2026-02-19 9:51 ` Sakari Ailus
2026-02-19 14:56 ` Jai Luthra
2026-02-20 10:11 ` Sakari Ailus
2026-02-23 9:11 ` Jacopo Mondi
2026-02-23 10:06 ` Sakari Ailus
2026-02-23 10:25 ` Jacopo Mondi
2026-02-24 5:25 ` Jai Luthra
2026-02-24 8:39 ` Sakari Ailus [this message]
2026-02-25 8:53 ` Jai Luthra
2026-02-24 18:22 ` Jacopo Mondi
2026-02-25 8:12 ` Jacopo Mondi
2026-02-25 8:58 ` Jai Luthra
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=aZ1jy6QIdNqYgDXa@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=dave.stevenson@raspberrypi.org \
--cc=jacopo.mondi@ideasonboard.com \
--cc=jai.luthra@ideasonboard.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.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®