From e762f5d44a12088899486443fef70f4c9c187db7 Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Sat, 13 Apr 2019 20:26:07 +0300 Subject: [PATCH] kernel: Fix kmod-drm-amdgpu and kmod-drm-radeon dependencies Currently the Geode builds fails on following kernel module missing dependencies: Package kmod-drm-amdgpu is missing dependencies for the following libraries: backlight.ko drm_kms_helper.ko fb.ko ttm.ko So this patch tries to fix the kmod-drm-amdgpu module dependecies. Fixes: 2f239c0 ("x86: video: add amdgpu DRM kernel package") Fixes: 2f6918e ("x86: video: add radeon DRM module support") Tested-by: Tomasz Maciej Nowak Signed-off-by: Lucian Cristian --- package/kernel/linux/modules/video.mk | 47 +++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index f11431dc2d..f4b19e59a2 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -239,10 +239,45 @@ endef $(eval $(call KernelPackage,drm)) +define KernelPackage/drm-ttm + SUBMENU:=$(VIDEO_MENU) + TITLE:=GPU memory management subsystem + DEPENDS:=@DISPLAY_SUPPORT +kmod-drm + KCONFIG:=CONFIG_DRM_TTM + FILES:=$(LINUX_DIR)/drivers/gpu/drm/ttm/ttm.ko + AUTOLOAD:=$(call AutoProbe,ttm) +endef + +define KernelPackage/drm-ttm/description + GPU memory management subsystem for devices with multiple GPU memory types. + Will be enabled automatically if a device driver uses it. +endef + +$(eval $(call KernelPackage,drm-ttm)) + +define KernelPackage/drm-kms-helper + SUBMENU:=$(VIDEO_MENU) + TITLE:=CRTC helpers for KMS drivers + DEPENDS:=@DISPLAY_SUPPORT +kmod-drm +kmod-fb +kmod-fb-sys-fops +kmod-fb-cfb-copyarea \ + +kmod-fb-cfb-fillrect +kmod-fb-cfb-imgblt +kmod-fb-sys-ram + KCONFIG:= \ + CONFIG_DRM_KMS_HELPER \ + CONFIG_DRM_KMS_FB_HELPER=y + FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm_kms_helper.ko + AUTOLOAD:=$(call AutoProbe,drm_kms_helper) +endef + +define KernelPackage/drm-kms-helper/description + CRTC helpers for KMS drivers. +endef + +$(eval $(call KernelPackage,drm-kms-helper)) + define KernelPackage/drm-amdgpu SUBMENU:=$(VIDEO_MENU) TITLE:=AMDGPU DRM support - DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-drm +kmod-i2c-algo-bit +amdgpu-firmware + DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \ + +kmod-drm-kms-helper +kmod-i2c-algo-bit +amdgpu-firmware KCONFIG:=CONFIG_DRM_AMDGPU \ CONFIG_DRM_AMDGPU_SI=y \ CONFIG_DRM_AMDGPU_CIK=y \ @@ -264,7 +299,7 @@ $(eval $(call KernelPackage,drm-amdgpu)) define KernelPackage/drm-imx SUBMENU:=$(VIDEO_MENU) TITLE:=Freescale i.MX DRM support - DEPENDS:=@TARGET_imx6 +kmod-drm +kmod-fb +kmod-fb-cfb-copyarea +kmod-fb-cfb-imgblt +kmod-fb-cfb-fillrect +kmod-fb-sys-fops +kmod-fb-sys-ram + DEPENDS:=@TARGET_imx6 +kmod-drm-kms-helper KCONFIG:=CONFIG_DRM_IMX \ CONFIG_DRM_FBDEV_EMULATION=y \ CONFIG_DRM_FBDEV_OVERALLOC=100 \ @@ -272,8 +307,6 @@ define KernelPackage/drm-imx CONFIG_RESET_CONTROLLER=y \ CONFIG_DRM_IMX_IPUV3 \ CONFIG_IMX_IPUV3 \ - CONFIG_DRM_KMS_HELPER \ - CONFIG_DRM_KMS_FB_HELPER=y \ CONFIG_DRM_GEM_CMA_HELPER=y \ CONFIG_DRM_KMS_CMA_HELPER=y \ CONFIG_DRM_IMX_FB_HELPER \ @@ -283,8 +316,7 @@ define KernelPackage/drm-imx CONFIG_DRM_IMX_HDMI=n FILES:= \ $(LINUX_DIR)/drivers/gpu/drm/imx/imxdrm.ko \ - $(LINUX_DIR)/drivers/gpu/ipu-v3/imx-ipu-v3.ko \ - $(LINUX_DIR)/drivers/gpu/drm/drm_kms_helper.ko + $(LINUX_DIR)/drivers/gpu/ipu-v3/imx-ipu-v3.ko AUTOLOAD:=$(call AutoLoad,08,imxdrm imx-ipu-v3 imx-ipuv3-crtc) endef @@ -342,7 +374,8 @@ $(eval $(call KernelPackage,drm-imx-ldb)) define KernelPackage/drm-radeon SUBMENU:=$(VIDEO_MENU) TITLE:=Radeon DRM support - DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-drm +kmod-i2c-algo-bit +radeon-firmware + DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-kms-helper \ + +kmod-drm-ttm +kmod-i2c-algo-bit +radeon-firmware KCONFIG:=CONFIG_DRM_RADEON FILES:=$(LINUX_DIR)/drivers/gpu/drm/radeon/radeon.ko AUTOLOAD:=$(call AutoProbe,radeon) -- 2.30.2