]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: rzv2h-ivc: Revise default VBLANK formula
authorDaniel Scally <dan.scally+renesas@ideasonboard.com>
Thu, 12 Feb 2026 10:08:11 +0000 (10:08 +0000)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 24 Mar 2026 15:13:09 +0000 (16:13 +0100)
The vertical blanking settings for the IVC block are dependent on
settings in the ISP. This was originally set to calculate as the
worst-case possible value, but it seems that this can cause the IVC
block to hang. Instead calculate the vblank to match the default
settings (which are currently all the driver sets anyway).

Cc: stable@vger.kernel.org
Fixes: f0b3984d821b ("media: platform: Add Renesas Input Video Control block driver")
Signed-off-by: Daniel Scally <dan.scally+renesas@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c

index 799453250b855b9837cd9a4930a86a63b4abc0fc..1e016b17dceebbc8950bdddce0c8c2a26f61bc33 100644 (file)
@@ -24,7 +24,7 @@
 #include <media/videobuf2-dma-contig.h>
 
 #define RZV2H_IVC_FIXED_HBLANK                 0x20
-#define RZV2H_IVC_MIN_VBLANK(hts)              max(0x1b, 15 + (120501 / (hts)))
+#define RZV2H_IVC_MIN_VBLANK(hts)              max(0x1b, 70100 / (hts))
 
 struct rzv2h_ivc_buf {
        struct vb2_v4l2_buffer vb;