x86: make i915 as a kmod with required firmware
authorJoe Zheng <joe.zheng@intel.com>
Sun, 25 Aug 2024 00:53:01 +0000 (00:53 +0000)
committerPetr Štetiar <ynezz@true.cz>
Thu, 28 Nov 2024 18:47:19 +0000 (18:47 +0000)
i915 driver requires to load correct firmware to work on latest x86
GPU, it is more reasonable to make it as a kernel module, so that
initramfs is not required, and it can also save some space from the
kernel image comparing being a built-in driver

Signed-off-by: Joe Zheng <joe.zheng@intel.com>
Link: https://github.com/openwrt/openwrt/pull/16276
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 77cfe8fd15d3d0f77ee16660d06a174f41b53444)
Link: https://github.com/openwrt/openwrt/pull/17097
Signed-off-by: Petr Štetiar <ynezz@true.cz>
package/kernel/linux/modules/video.mk
target/linux/x86/64/config-6.6
target/linux/x86/generic/config-6.6
target/linux/x86/legacy/config-6.6

index 8b4585a624e604283e1da0ca13a3478d21958d9b..fc0f038863ceaf0b5c6f8f5004ed9d95729dd900 100644 (file)
@@ -438,6 +438,48 @@ endef
 
 $(eval $(call KernelPackage,drm-amdgpu))
 
+define KernelPackage/drm-i915
+  SUBMENU:=$(VIDEO_MENU)
+  TITLE:=Intel i915 DRM support
+  DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \
+       +kmod-drm-ttm-helper +kmod-drm-kms-helper +kmod-i2c-algo-bit +i915-firmware-dmc \
+       +kmod-drm-display-helper +kmod-drm-buddy +kmod-acpi-video \
+       +kmod-drm-exec +kmod-drm-suballoc-helper
+  KCONFIG:=CONFIG_DRM_I915 \
+       CONFIG_DRM_I915_CAPTURE_ERROR=y \
+       CONFIG_DRM_I915_COMPRESS_ERROR=y \
+       CONFIG_DRM_I915_DEBUG=n \
+       CONFIG_DRM_I915_DEBUG_GUC=n \
+       CONFIG_DRM_I915_DEBUG_MMIO=n \
+       CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n \
+       CONFIG_DRM_I915_DEBUG_VBLANK_EVADE=n \
+       CONFIG_DRM_I915_FENCE_TIMEOUT=10000 \
+       CONFIG_DRM_I915_FORCE_PROBE="" \
+       CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500 \
+       CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS=n \
+       CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000 \
+       CONFIG_DRM_I915_PREEMPT_TIMEOUT=640 \
+       CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500 \
+       CONFIG_DRM_I915_REQUEST_TIMEOUT=20000 \
+       CONFIG_DRM_I915_SELFTEST=n \
+       CONFIG_DRM_I915_STOP_TIMEOUT=100 \
+       CONFIG_DRM_I915_SW_FENCE_CHECK_DAG=n \
+       CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS=n \
+       CONFIG_DRM_I915_TIMESLICE_DURATION=1 \
+       CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250 \
+       CONFIG_DRM_I915_USERPTR=y \
+       CONFIG_DRM_I915_WERROR=n \
+       CONFIG_FB_INTEL=n
+  FILES:=$(LINUX_DIR)/drivers/gpu/drm/i915/i915.ko
+  AUTOLOAD:=$(call AutoProbe,i915)
+endef
+
+define KernelPackage/drm-i915/description
+  Direct Rendering Manager (DRM) support for Intel GPU
+endef
+
+$(eval $(call KernelPackage,drm-i915))
+
 
 define KernelPackage/drm-imx
   SUBMENU:=$(VIDEO_MENU)
index def4527f77180bdce2fd2380217457916cdb0681..3475e65287288bb6dcedee8b1b2c5f79d9d6d428 100644 (file)
@@ -151,30 +151,6 @@ CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
 CONFIG_DRM_GEM_SHMEM_HELPER=y
 # CONFIG_DRM_HYPERV is not set
-CONFIG_DRM_I915=y
-CONFIG_DRM_I915_CAPTURE_ERROR=y
-CONFIG_DRM_I915_COMPRESS_ERROR=y
-# CONFIG_DRM_I915_DEBUG is not set
-# CONFIG_DRM_I915_DEBUG_GUC is not set
-# CONFIG_DRM_I915_DEBUG_MMIO is not set
-# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
-# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
-CONFIG_DRM_I915_FENCE_TIMEOUT=10000
-CONFIG_DRM_I915_FORCE_PROBE=""
-CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
-# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
-CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
-CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
-CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
-CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
-# CONFIG_DRM_I915_SELFTEST is not set
-CONFIG_DRM_I915_STOP_TIMEOUT=100
-# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
-# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
-CONFIG_DRM_I915_TIMESLICE_DURATION=1
-CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
-CONFIG_DRM_I915_USERPTR=y
-# CONFIG_DRM_I915_WERROR is not set
 CONFIG_DRM_KMS_HELPER=y
 CONFIG_DRM_MIPI_DSI=y
 CONFIG_DRM_PANEL=y
index 091584e0774aa8a879d8e05e3316327d8d616a01..ecbd0aa93ee29a298cc10029c18a768c209df144 100644 (file)
@@ -86,30 +86,6 @@ CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
 CONFIG_DRM_GEM_SHMEM_HELPER=y
 # CONFIG_DRM_HYPERV is not set
-CONFIG_DRM_I915=y
-CONFIG_DRM_I915_CAPTURE_ERROR=y
-CONFIG_DRM_I915_COMPRESS_ERROR=y
-# CONFIG_DRM_I915_DEBUG is not set
-# CONFIG_DRM_I915_DEBUG_GUC is not set
-# CONFIG_DRM_I915_DEBUG_MMIO is not set
-# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
-# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
-CONFIG_DRM_I915_FENCE_TIMEOUT=10000
-CONFIG_DRM_I915_FORCE_PROBE=""
-CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
-# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
-CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
-CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
-CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
-CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
-# CONFIG_DRM_I915_SELFTEST is not set
-CONFIG_DRM_I915_STOP_TIMEOUT=100
-# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
-# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
-CONFIG_DRM_I915_TIMESLICE_DURATION=1
-CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
-CONFIG_DRM_I915_USERPTR=y
-# CONFIG_DRM_I915_WERROR is not set
 CONFIG_DRM_KMS_HELPER=y
 CONFIG_DRM_MIPI_DSI=y
 CONFIG_DRM_PANEL=y
index 8ce9237a21dfe5be771a1a9f87b7c852bb3c4f1d..10511ff08b384d0242c5e945eb95b076f151f0e9 100644 (file)
@@ -67,30 +67,6 @@ CONFIG_DRM_DISPLAY_HELPER=y
 CONFIG_DRM_EXEC=y
 CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
-CONFIG_DRM_I915=y
-CONFIG_DRM_I915_CAPTURE_ERROR=y
-CONFIG_DRM_I915_COMPRESS_ERROR=y
-# CONFIG_DRM_I915_DEBUG is not set
-# CONFIG_DRM_I915_DEBUG_GUC is not set
-# CONFIG_DRM_I915_DEBUG_MMIO is not set
-# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
-# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
-CONFIG_DRM_I915_FENCE_TIMEOUT=10000
-CONFIG_DRM_I915_FORCE_PROBE=""
-CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
-# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
-CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
-CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
-CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
-CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
-# CONFIG_DRM_I915_SELFTEST is not set
-CONFIG_DRM_I915_STOP_TIMEOUT=100
-# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
-# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
-CONFIG_DRM_I915_TIMESLICE_DURATION=1
-CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
-CONFIG_DRM_I915_USERPTR=y
-# CONFIG_DRM_I915_WERROR is not set
 CONFIG_DRM_KMS_HELPER=y
 CONFIG_DRM_MIPI_DSI=y
 CONFIG_DRM_PANEL=y