Skip to content

Commit

Permalink
kernel: modules: video: adapt for loongarch64
Browse files Browse the repository at this point in the history
* Allow kmod-acpi-video to be built for loongarch64:
The x86-specific CONFIG_ACPI_WMI will be split from default
kmod-acpi-video as a board-specific addition.

* Allow kmod-drm-amdgpu to be built for loongarch64:
Also add loongarch64-specific configs and modules.

Signed-off-by: Weijie Gao <[email protected]>
  • Loading branch information
hackpascal authored and 981213 committed May 4, 2024
1 parent 886a507 commit 159a285
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions package/kernel/linux/modules/video.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ V4L2_MEM2MEM_DIR=platform
define KernelPackage/acpi-video
SUBMENU:=$(VIDEO_MENU)
TITLE:=ACPI Extensions For Display Adapters
DEPENDS:=@TARGET_x86 +kmod-backlight
DEPENDS:=@TARGET_x86||TARGET_loongarch64 +kmod-backlight
HIDDEN:=1
KCONFIG:=CONFIG_ACPI_VIDEO \
CONFIG_ACPI_WMI
FILES:=$(LINUX_DIR)/drivers/acpi/video.ko \
$(LINUX_DIR)/drivers/platform/x86/wmi.ko
AUTOLOAD:=$(call AutoProbe,wmi video)
KCONFIG:=CONFIG_ACPI_VIDEO
FILES:=$(LINUX_DIR)/drivers/acpi/video.ko
AUTOLOAD:=$(call AutoProbe,video)
endef

define KernelPackage/acpi-video/description
Kernel support for integrated graphics devices.
endef

define KernelPackage/acpi-video/x86
KCONFIG+=CONFIG_ACPI_WMI
FILES+=$(LINUX_DIR)/drivers/platform/x86/wmi.ko
AUTOLOAD:=$(call AutoProbe,wmi video)
endef

$(eval $(call KernelPackage,acpi-video))

define KernelPackage/backlight
Expand Down Expand Up @@ -372,7 +376,7 @@ $(eval $(call KernelPackage,drm-suballoc-helper))
define KernelPackage/drm-amdgpu
SUBMENU:=$(VIDEO_MENU)
TITLE:=AMDGPU DRM support
DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \
DEPENDS:=@TARGET_x86||TARGET_loongarch64 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \
+kmod-drm-ttm-helper +kmod-drm-kms-helper +kmod-i2c-algo-bit +amdgpu-firmware \
+kmod-drm-display-helper +kmod-drm-buddy +kmod-acpi-video \
+LINUX_6_6:kmod-drm-exec +LINUX_6_6:kmod-drm-suballoc-helper
Expand All @@ -391,6 +395,13 @@ define KernelPackage/drm-amdgpu/description
Direct Rendering Manager (DRM) support for AMDGPU Cards
endef

define KernelPackage/drm-amdgpu/loongarch64
KCONFIG+=CONFIG_DRM_AMDGPU_USERPTR=y \
CONFIG_DRM_AMD_DC=y \
CONFIG_DRM_AMD_DC_FP=y \
CONFIG_DRM_AMD_DC_SI=y
endef

$(eval $(call KernelPackage,drm-amdgpu))


Expand Down

0 comments on commit 159a285

Please sign in to comment.