[openwrt/openwrt] kernel: add support for tw686x frame grabbers

LEDE Commits lede-commits at lists.infradead.org
Thu Jul 6 23:22:20 PDT 2023


xback pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/bc91784f26b2816c949ad4b102930ccd449e2881

commit bc91784f26b2816c949ad4b102930ccd449e2881
Author: Koen Vandeputte <koen.vandeputte at citymesh.com>
AuthorDate: Wed Jun 7 11:58:52 2023 +0200

    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 <koen.vandeputte at citymesh.com>
---
 package/kernel/linux/modules/video.mk | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

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))




More information about the lede-commits mailing list