]> git.baikalelectronics.ru Git - kernel.git/commit
ivtv: fix incorrect device_caps for ivtvfb
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Sun, 6 Mar 2022 11:29:11 +0000 (12:29 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 7 Mar 2022 16:21:53 +0000 (17:21 +0100)
commitaef4be0f0b0b55d28d1a6cda17e19b1d91149647
tree25f12a439a4ca0b8db02e199443bef5fb624deed
parentf48a58d5d3445c1d9320af688f7073b4f27aaf00
ivtv: fix incorrect device_caps for ivtvfb

The VIDIOC_G_FBUF and related overlay ioctls no longer worked (-ENOTTY was
returned).

The root cause was the introduction of the caps field in ivtv-driver.h.
While loading the ivtvfb module would update the video_device device_caps
field with V4L2_CAP_VIDEO_OUTPUT_OVERLAY it would not update that caps
field, and that's what the overlay ioctls would look at.

It's a bad idea to keep information in two places, so drop the caps field
and only use vdev.device_caps.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Fixes: bd7d44fc8c7a (media: media/pci: set device_caps in struct video_device)
drivers/media/pci/ivtv/ivtv-driver.h
drivers/media/pci/ivtv/ivtv-ioctl.c
drivers/media/pci/ivtv/ivtv-streams.c