From: Koen Vandeputte Date: Wed, 7 Jun 2023 09:58:52 +0000 (+0200) Subject: kernel: add support for tw686x frame grabbers X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bc91784f26b2816c949ad4b102930ccd449e2881;p=openwrt%2Fstaging%2Flinusw.git kernel: add support for tw686x frame grabbers Adds support for Intersil/Techwell tw686x frame grabbers. By default, this module uses MEMCPY to transfer data. Let's switch to "Contiguous DMA" which is the fastest performing method available. [ 10.074349] tw6869: PCI 0000:07:00.0, IRQ 33, MMIO 0x1200000 (contig mode) [ 10.081381] tw686x 0000:07:00.0: enabling device (0140 -> 0142) Signed-off-by: Koen Vandeputte --- diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index d06ee3926b..e8a2d479ee 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -439,6 +439,10 @@ $(AddDepends/video) CONFIG_MEDIA_CAMERA_SUPPORT=y endef +define AddDepends/framegrabber +$(AddDepends/video) + KCONFIG+=CONFIG_MEDIA_PCI_SUPPORT=y +endef define KernelPackage/video-videobuf2 TITLE:=videobuf2 lib @@ -1122,3 +1126,19 @@ define KernelPackage/video-pxp/description endef $(eval $(call KernelPackage,video-pxp)) + +define KernelPackage/video-tw686x + TITLE:=TW686x support + DEPENDS:=@PCIE_SUPPORT +kmod-video-dma +kmod-sound-core + KCONFIG:= CONFIG_VIDEO_TW686X + FILES:= $(LINUX_DIR)/drivers/media/pci/tw686x/tw686x.ko + AUTOLOAD:=$(call AutoProbe,tw686x) + MODPARAMS.tw686x:=dma_mode=contig + $(call AddDepends/framegrabber) +endef + +define KernelPackage/video-tw686x/description + The Intersil/Techwell TW686x kernel module +endef + +$(eval $(call KernelPackage,video-tw686x))