[openwrt/openwrt] kernel: modules: video: adapt for kernel 6.6

LEDE Commits lede-commits at lists.infradead.org
Mon Mar 11 12:18:00 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5b08b56007205b9703f207c8f6235ca83ba359af

commit 5b08b56007205b9703f207c8f6235ca83ba359af
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Sat Jan 6 16:19:10 2024 +0800

    kernel: modules: video: adapt for kernel 6.6
    
    Adapt video kmods for building under kernel 6.6:
    * Add drm_exec.ko and drm_suballoc_helper.ko for kmod-drm as they
    are added since 6.6 and 6.4
    * Add uvc.ko for kmod-video-uvc as related contents was split as a
    new module since 6.3
    
    Signed-off-by: Tan Zien <nabsdh9 at gmail.com>
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 package/kernel/linux/modules/video.mk | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk
index 982bcb1db0..e3a350e781 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -246,11 +246,15 @@ define KernelPackage/drm
   HIDDEN:=1
   DEPENDS:=+kmod-dma-buf +kmod-i2c-core +PACKAGE_kmod-backlight:kmod-backlight \
 	+kmod-fb
-  KCONFIG:=CONFIG_DRM
+  KCONFIG:=CONFIG_DRM \
+	CONFIG_DRM_EXEC at ge6.6 \
+	CONFIG_DRM_SUBALLOC_HELPER at ge6.4
   FILES:= \
 	$(LINUX_DIR)/drivers/gpu/drm/drm.ko \
-	$(LINUX_DIR)/drivers/gpu/drm/drm_panel_orientation_quirks.ko
-  AUTOLOAD:=$(call AutoLoad,05,drm)
+	$(LINUX_DIR)/drivers/gpu/drm/drm_panel_orientation_quirks.ko \
+	$(LINUX_DIR)/drivers/gpu/drm/drm_exec.ko at ge6.6 \
+	$(LINUX_DIR)/drivers/gpu/drm/drm_suballoc_helper.ko at ge6.4
+  AUTOLOAD:=$(call AutoLoad,05,drm_exec at ge6.6 drm_suballoc_helper at ge6.4 drm)
 endef
 
 define KernelPackage/drm/description
@@ -262,7 +266,7 @@ $(eval $(call KernelPackage,drm))
 define KernelPackage/drm-buddy
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=A page based buddy allocator
-  DEPENDS:=@DISPLAY_SUPPORT +kmod-drm @LINUX_6_1
+  DEPENDS:=@DISPLAY_SUPPORT +kmod-drm @LINUX_6_1||LINUX_6_6
   KCONFIG:=CONFIG_DRM_BUDDY
   FILES:= $(LINUX_DIR)/drivers/gpu/drm/drm_buddy.ko
   AUTOLOAD:=$(call AutoProbe,drm_buddy)
@@ -277,7 +281,7 @@ $(eval $(call KernelPackage,drm-buddy))
 define KernelPackage/drm-display-helper
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=DRM helpers for display adapters drivers
-  DEPENDS:=@DISPLAY_SUPPORT +kmod-drm-kms-helper @LINUX_6_1
+  DEPENDS:=@DISPLAY_SUPPORT +kmod-drm-kms-helper @LINUX_6_1||LINUX_6_6
   KCONFIG:=CONFIG_DRM_DISPLAY_HELPER
   FILES:=$(LINUX_DIR)/drivers/gpu/drm/display/drm_display_helper.ko
   AUTOLOAD:=$(call AutoProbe,drm_display_helper)
@@ -349,7 +353,8 @@ define KernelPackage/drm-amdgpu
 	CONFIG_DRM_AMD_DC=y \
 	CONFIG_DEBUG_KERNEL_DC=n
   FILES:=$(LINUX_DIR)/drivers/gpu/drm/amd/amdgpu/amdgpu.ko \
-	$(LINUX_DIR)/drivers/gpu/drm/scheduler/gpu-sched.ko
+	$(LINUX_DIR)/drivers/gpu/drm/scheduler/gpu-sched.ko \
+	$(LINUX_DIR)/drivers/gpu/drm/amd/amdxcp/amdxcp.ko at ge6.5
   AUTOLOAD:=$(call AutoProbe,amdgpu)
 endef
 
@@ -557,9 +562,10 @@ $(eval $(call KernelPackage,video-pwc))
 define KernelPackage/video-uvc
   TITLE:=USB Video Class (UVC) support
   DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-video-videobuf2 +kmod-input-core
-  KCONFIG:= CONFIG_USB_VIDEO_CLASS
-  FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/uvc/uvcvideo.ko
-  AUTOLOAD:=$(call AutoProbe,uvcvideo)
+  KCONFIG:= CONFIG_USB_VIDEO_CLASS CONFIG_UVC_COMMON at ge6.3
+  FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/uvc/uvcvideo.ko \
+	$(LINUX_DIR)/drivers/media/common/uvc.ko at ge6.3
+  AUTOLOAD:=$(call AutoProbe,uvc at ge6.3 uvcvideo)
   $(call AddDepends/camera)
 endef
 




More information about the lede-commits mailing list