Skip to content

Commit

Permalink
x86: make i915 as a kmod with required firmware
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: openwrt#16276
Signed-off-by: Robert Marko <[email protected]>
  • Loading branch information
joez authored and robimarko committed Nov 15, 2024
1 parent ca00baf commit 77cfe8f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 72 deletions.
42 changes: 42 additions & 0 deletions package/kernel/linux/modules/video.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
24 changes: 0 additions & 24 deletions target/linux/x86/64/config-6.6
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 0 additions & 24 deletions target/linux/x86/generic/config-6.6
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 0 additions & 24 deletions target/linux/x86/legacy/config-6.6
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 77cfe8f

Please sign in to comment.