summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2022-10-12 16:46:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-03 23:52:32 +0900
commit438ec9e2cca53002a681ed6fe8fd12e54cb60bf9 (patch)
tree5b8c84fadc0d8474f0a3e24e5f519003567773cb /include
parent9cf9211635b68e8e0c8cb88d43ca7dc83e4632aa (diff)
downloadlinux-stable-438ec9e2cca53002a681ed6fe8fd12e54cb60bf9.tar.gz
linux-stable-438ec9e2cca53002a681ed6fe8fd12e54cb60bf9.tar.bz2
linux-stable-438ec9e2cca53002a681ed6fe8fd12e54cb60bf9.zip
media: videodev2.h: V4L2_DV_BT_BLANKING_HEIGHT should check 'interlaced'
[ Upstream commit 8da7f0976b9071b528c545008de9d10cc81883b1 ] 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> Signed-off-by: Sasha Levin <sashal@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 b73f4423bc09..ad6a633f5848 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1418,7 +1418,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))