Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] v4l2-dv-timings: support interlaced in v4l2_print_dv_timings

The v4l2_print_dv_timings() didn't log the interlaced format correctly. The timings
for the bottom field weren't logged and the fields per second value was half of what
it should have been.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
8cf6874e dc0cf4cf

+7
+7
drivers/media/v4l2-core/v4l2-dv-timings.c
··· 262 262 263 263 htot = V4L2_DV_BT_FRAME_WIDTH(bt); 264 264 vtot = V4L2_DV_BT_FRAME_HEIGHT(bt); 265 + if (bt->interlaced) 266 + vtot /= 2; 265 267 266 268 if (prefix == NULL) 267 269 prefix = ""; ··· 284 282 dev_prefix, bt->vfrontporch, 285 283 (bt->polarities & V4L2_DV_VSYNC_POS_POL) ? "+" : "-", 286 284 bt->vsync, bt->vbackporch); 285 + if (bt->interlaced) 286 + pr_info("%s: vertical bottom field: fp = %u, %ssync = %u, bp = %u\n", 287 + dev_prefix, bt->il_vfrontporch, 288 + (bt->polarities & V4L2_DV_VSYNC_POS_POL) ? "+" : "-", 289 + bt->il_vsync, bt->il_vbackporch); 287 290 pr_info("%s: pixelclock: %llu\n", dev_prefix, bt->pixelclock); 288 291 pr_info("%s: flags (0x%x):%s%s%s%s%s\n", dev_prefix, bt->flags, 289 292 (bt->flags & V4L2_DV_FL_REDUCED_BLANKING) ?