From: Joe Zheng Date: Sun, 25 Aug 2024 00:53:01 +0000 (+0000) Subject: x86: make i915 as a kmod with required firmware X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=77cfe8fd15d3d0f77ee16660d06a174f41b53444;p=openwrt%2Fstaging%2Fpepe2k.git x86: make i915 as a kmod with required firmware 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 Link: https://github.com/openwrt/openwrt/pull/16276 Signed-off-by: Robert Marko --- diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index 8b4585a624..fc0f038863 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -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) diff --git a/target/linux/x86/64/config-6.6 b/target/linux/x86/64/config-6.6 index def4527f77..3475e65287 100644 --- a/target/linux/x86/64/config-6.6 +++ b/target/linux/x86/64/config-6.6 @@ -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 diff --git a/target/linux/x86/generic/config-6.6 b/target/linux/x86/generic/config-6.6 index 091584e077..ecbd0aa93e 100644 --- a/target/linux/x86/generic/config-6.6 +++ b/target/linux/x86/generic/config-6.6 @@ -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 diff --git a/target/linux/x86/legacy/config-6.6 b/target/linux/x86/legacy/config-6.6 index 8ce9237a21..10511ff08b 100644 --- a/target/linux/x86/legacy/config-6.6 +++ b/target/linux/x86/legacy/config-6.6 @@ -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