Skip to content

Commit 7f98639

Browse files
Pawel OsciakMauro Carvalho Chehab
authored andcommitted
V4L/DVB: add memory-to-memory device helper framework for videobuf
A mem-to-mem device is a device that uses memory buffers passed by userspace applications for both their source and destination data. This is different from existing drivers, which utilize memory buffers for either input or output, but not both. In terms of V4L2 such a device would be both of OUTPUT and CAPTURE type. Examples of such devices would be: image 'resizers', 'rotators', 'colorspace converters', etc. This patch adds a separate Kconfig sub-menu for mem-to-mem devices as well. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1 parent 35e6aa9 commit 7f98639

File tree

4 files changed

+850
-0
lines changed

4 files changed

+850
-0
lines changed

drivers/media/video/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ config VIDEO_TUNER
4545
tristate
4646
depends on MEDIA_TUNER
4747

48+
config V4L2_MEM2MEM_DEV
49+
tristate
50+
depends on VIDEOBUF_GEN
51+
4852
#
4953
# Multimedia Video device configuration
5054
#
@@ -1121,3 +1125,13 @@ config USB_S2255
11211125

11221126
endif # V4L_USB_DRIVERS
11231127
endif # VIDEO_CAPTURE_DRIVERS
1128+
1129+
menuconfig V4L_MEM2MEM_DRIVERS
1130+
bool "Memory-to-memory multimedia devices"
1131+
depends on VIDEO_V4L2
1132+
default n
1133+
---help---
1134+
Say Y here to enable selecting drivers for V4L devices that
1135+
use system memory for both source and destination buffers, as opposed
1136+
to capture and output drivers, which use memory buffers for just
1137+
one of those.

drivers/media/video/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ obj-$(CONFIG_VIDEOBUF_VMALLOC) += videobuf-vmalloc.o
117117
obj-$(CONFIG_VIDEOBUF_DVB) += videobuf-dvb.o
118118
obj-$(CONFIG_VIDEO_BTCX) += btcx-risc.o
119119

120+
obj-$(CONFIG_V4L2_MEM2MEM_DEV) += v4l2-mem2mem.o
121+
120122
obj-$(CONFIG_VIDEO_M32R_AR_M64278) += arv.o
121123

122124
obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o

0 commit comments

Comments
 (0)