[PATCH 14/14] kernel: modules: package Tegra Video Input module
Tomasz Maciej Nowak
tmn505 at terefe.re
Tue Oct 29 08:47:07 PDT 2024
From: Tomasz Maciej Nowak <tmn505 at gmail.com>
Support for video input from connected camera sensors.
Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
package/kernel/linux/modules/usb.mk | 1 +
package/kernel/linux/modules/video.mk | 29 +++++++++++++++++++++++++--
target/linux/tegra/image/armv8.mk | 2 +-
3 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index a970a08e6b2c..3bad7cf9907e 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -576,6 +576,7 @@ define KernelPackage/usb-audio
CONFIG_SND_USB_AUDIO
$(call AddDepends/usb)
$(call AddDepends/sound)
+ DEPENDS+=$(if $(CONFIG_MEDIA_CONTROLLER),+kmod-video-core)
FILES:= \
$(LINUX_DIR)/sound/usb/snd-usbmidi-lib.ko \
$(LINUX_DIR)/sound/usb/snd-usb-audio.ko
diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk
index d48c38d54993..ab971a896d7d 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -573,7 +573,8 @@ define KernelPackage/video-core
CONFIG_V4L_PLATFORM_DRIVERS=y \
CONFIG_MEDIA_PLATFORM_DRIVERS=y
FILES:= \
- $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko
+ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko \
+ $(if $(CONFIG_MEDIA_CONTROLLER),$(LINUX_DIR)/drivers/media/mc/mc.ko)
AUTOLOAD:=$(call AutoLoad,60,videodev)
endef
@@ -612,7 +613,7 @@ define KernelPackage/video-videobuf2
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-common.ko \
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-v4l2.ko \
$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-memops.ko \
- $(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-vmalloc.ko
+ $(if $(CONFIG_VIDEOBUF2_VMALLOC),$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-vmalloc.ko)
AUTOLOAD:=$(call AutoLoad,65,videobuf2-core videobuf-v4l2 videobuf2-memops videobuf2-vmalloc)
$(call AddDepends/video)
endef
@@ -1333,3 +1334,27 @@ define KernelPackage/video-tw686x/description
endef
$(eval $(call KernelPackage,video-tw686x))
+
+define KernelPackage/video-tegra-vi
+ TITLE:=Tegra SoC VideoInput
+ DEPENDS:=@TARGET_tegra +kmod-drm-tegra +kmod-video-dma-contig +kmod-video-videobuf2
+ KCONFIG:= \
+ CONFIG_STAGING_MEDIA=y \
+ CONFIG_STAGING_MEDIA_DEPRECATED=n \
+ CONFIG_VIDEO_TEGRA \
+ CONFIG_VIDEO_TEGRA_TPG=n \
+ CONFIG_VIDEO_MAX96712=n
+ FILES:= \
+ $(LINUX_DIR)/drivers/staging/media/tegra-video/tegra-video.ko \
+ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-async.ko \
+ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-dv-timings.ko \
+ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-fwnode.ko
+ AUTOLOAD:=$(call AutoProbe,tegra-video)
+ $(call AddDepends/video)
+endef
+
+define KernelPackage/video-tegra-vi/description
+ Tegra SoC VideoInput driver
+endef
+
+$(eval $(call KernelPackage,video-tegra-vi))
diff --git a/target/linux/tegra/image/armv8.mk b/target/linux/tegra/image/armv8.mk
index 406d6ce101de..80cb14325e59 100644
--- a/target/linux/tegra/image/armv8.mk
+++ b/target/linux/tegra/image/armv8.mk
@@ -6,7 +6,7 @@ define Device/nvidia_jetson-tx1
kmod-bluetooth kmod-brcmfmac kmod-drm-nouveau kmod-drm-tegra \
kmod-sound-soc-tegra210 kmod-usb-gadget-serial kmod-usb-hid \
kmod-usb-net-rtl8152 kmod-usb-udc-tegra kmod-usb-xhci-tegra \
- wpad-basic-mbedtls
+ kmod-video-tegra-vi wpad-basic-mbedtls
SUPPORTED_DEVICES := nvidia,p2371-2180
endef
TARGET_DEVICES += nvidia_jetson-tx1
--
2.47.0
More information about the openwrt-devel
mailing list