Skip to content

Commit

Permalink
media: remove the old videobuf framework
Browse files Browse the repository at this point in the history
The last driver that still used this old framework has been converted
to the videobuf2 framework. So it is now time to delete the old videobuf
code.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Hans Verkuil committed Sep 27, 2023
1 parent 785c4aa commit 2a2fffb
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 3,460 deletions.
1 change: 0 additions & 1 deletion Documentation/driver-api/media/v4l2-core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Video4Linux devices
v4l2-subdev
v4l2-event
v4l2-controls
v4l2-videobuf
v4l2-videobuf2
v4l2-dv-timings
v4l2-flash-led-class
Expand Down
8 changes: 0 additions & 8 deletions Documentation/driver-api/media/v4l2-dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@ changing the e.g. exposure of the webcam.
Of course, you can always do all the locking yourself by leaving both lock
pointers at ``NULL``.

If you use the old :ref:`videobuf framework <vb_framework>` then you must
pass the :c:type:`video_device`->lock to the videobuf queue initialize
function: if videobuf has to wait for a frame to arrive, then it will
temporarily unlock the lock and relock it afterwards. If your driver also
waits in the code, then you should do the same to allow other
processes to access the device node while the first process is waiting for
something.

In the case of :ref:`videobuf2 <vb2_framework>` you will need to implement the
``wait_prepare()`` and ``wait_finish()`` callbacks to unlock/lock if applicable.
If you use the ``queue->lock`` pointer, then you can use the helper functions
Expand Down
403 changes: 0 additions & 403 deletions Documentation/driver-api/media/v4l2-videobuf.rst

This file was deleted.

12 changes: 0 additions & 12 deletions Documentation/translations/zh_CN/video4linux/v4l2-framework.txt
Original file line number Diff line number Diff line change
Expand Up @@ -768,18 +768,6 @@ const char *video_device_node_name(struct video_device *vdev);
此功能,而非访问 video_device::num 和 video_device::minor 域。


视频缓冲辅助函数
---------------

v4l2 核心 API 提供了一个处理视频缓冲的标准方法(称为“videobuf”)。
这些方法使驱动可以通过统一的方式实现 read()、mmap() 和 overlay()。
目前在设备上支持视频缓冲的方法有分散/聚集 DMA(videobuf-dma-sg)、
线性 DMA(videobuf-dma-contig)以及大多用于 USB 设备的用 vmalloc
分配的缓冲(videobuf-vmalloc)。

请参阅 Documentation/driver-api/media/v4l2-videobuf.rst,以获得更多关于 videobuf
层的使用信息。

v4l2_fh 结构体
-------------

Expand Down
16 changes: 0 additions & 16 deletions drivers/media/v4l2-core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,3 @@ config V4L2_CCI_I2C
depends on I2C
select REGMAP_I2C
select V4L2_CCI

# Used by drivers that need Videobuf modules
config VIDEOBUF_GEN
tristate

config VIDEOBUF_DMA_SG
tristate
select VIDEOBUF_GEN

config VIDEOBUF_VMALLOC
tristate
select VIDEOBUF_GEN

config VIDEOBUF_DMA_CONTIG
tristate
select VIDEOBUF_GEN
5 changes: 0 additions & 5 deletions drivers/media/v4l2-core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,5 @@ obj-$(CONFIG_V4L2_JPEG_HELPER) += v4l2-jpeg.o
obj-$(CONFIG_V4L2_MEM2MEM_DEV) += v4l2-mem2mem.o
obj-$(CONFIG_V4L2_VP9) += v4l2-vp9.o

obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += videobuf-dma-contig.o
obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o
obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o
obj-$(CONFIG_VIDEOBUF_VMALLOC) += videobuf-vmalloc.o

obj-$(CONFIG_VIDEO_TUNER) += tuner.o
obj-$(CONFIG_VIDEO_DEV) += v4l2-dv-timings.o videodev.o
Loading

0 comments on commit 2a2fffb

Please sign in to comment.