summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2022-10-12 17:46:17 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-10-25 17:40:07 +0200
commit8da7f0976b9071b528c545008de9d10cc81883b1 (patch)
tree70741e99ac925ab5bc54abf22c9c8744203c1ea4 /include
parentmedia: v4l2-dv-timings: add sanity checks for blanking values (diff)
downloadlinux-8da7f0976b9071b528c545008de9d10cc81883b1.tar.xz
linux-8da7f0976b9071b528c545008de9d10cc81883b1.zip
media: videodev2.h: V4L2_DV_BT_BLANKING_HEIGHT should check 'interlaced'
If it is a progressive (non-interlaced) format, then ignore the interlaced timing values. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 7f68127fa11f ([media] videodev2.h: defines to calculate blanking and frame sizes) Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/videodev2.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 86cae23cc446..29da1f4b4578 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1601,7 +1601,8 @@ struct v4l2_bt_timings {
((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt))
#define V4L2_DV_BT_BLANKING_HEIGHT(bt) \
((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \
- (bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch)
+ ((bt)->interlaced ? \
+ ((bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch) : 0))
#define V4L2_DV_BT_FRAME_HEIGHT(bt) \
((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt))