Re: RFC: MEDIA: Driver for ON Semi AR0521 camera sensor
From: Krzysztof Hałasa
Date: Tue Mar 30 2021 - 06:48:26 EST
Laurent,
There is an additional issue:
>> +static const struct v4l2_subdev_video_ops ar0521_video_ops = {
>> + .g_frame_interval = ar0521_g_frame_interval,
>> + .s_frame_interval = ar0521_s_frame_interval,
>
> For raw sensors, frame intervals should be configured using
> V4L2_CID_HBLANK and V4L2_CID_VBLANK instead. These two operations should
> be dropped.
Unfortunately, I require a way to specify an exact timings for the
sensor. The frame interval gives me a way to do this, but it requires
setting HBLANK and VBLANK _and_ an extra register
(AR0521_REG_EXTRA_DELAY) which is specified in pixels, not lines.
E.g. the total number of pixels (active or otherwise) is not
(width + h blank) * (heigth + v blank)
but rather:
(width + h blank) * (heigth + v blank) + extra_delay
How do I do that with HBLANK/VBLANK controls?
BTW there are specific constraints on the pixel clock as well
(the active scanning must be as fast as possible, which means fast pixel
clock, minimum possible hblank and thus long vblank).
All comments are appreciated.
--
Krzysztof Hałasa
Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa