[PATCH 12/14] kernel: modules: package Tegra and Nouveau DRM drivers

Tomasz Maciej Nowak tmn505 at terefe.re
Tue Oct 29 08:47:05 PDT 2024


From: Tomasz Maciej Nowak <tmn505 at gmail.com>

Responsible for console output on HDMI port and power management of the
SoC. Unfortunately need to be built as modules because of necesarry
firmware.

Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 package/kernel/linux/modules/video.mk | 57 +++++++++++++++++++++++++++
 target/linux/loongarch64/config-6.6   |  3 ++
 target/linux/tegra/image/armv8.mk     |  6 +--
 target/linux/zynq/config-6.6          |  3 ++
 4 files changed, 66 insertions(+), 3 deletions(-)

diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk
index 52fc55bbadd0..d48c38d54993 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -501,6 +501,63 @@ endef
 
 $(eval $(call KernelPackage,drm-radeon))
 
+
+define KernelPackage/drm-nouveau
+  SUBMENU:=$(VIDEO_MENU)
+  TITLE:=Nouveau DRM driver
+  DEPENDS:=@DISPLAY_SUPPORT +kmod-backlight +kmod-drm +kmod-drm-display-helper \
+	+kmod-drm-exec +kmod-drm-kms-helper +kmod-drm-ttm +kmod-drm-ttm-helper \
+	+kmod-hwmon-core +kmod-i2c-algo-bit +TARGET_x86:kmod-acpi-video \
+	+TARGET_tegra_armv8:kmod-drm-tegra +TARGET_tegra_armv8:gm20b-firmware
+  KCONFIG:= \
+	CONFIG_DRM_NOUVEAU \
+	CONFIG_DRM_NOUVEAU_BACKLIGHT=y \
+	CONFIG_NOUVEAU_DEBUG=5 \
+	CONFIG_NOUVEAU_DEBUG_DEFAULT=3 \
+	CONFIG_NOUVEAU_DEBUG_MMU=n \
+	CONFIG_NOUVEAU_DEBUG_PUSH=n \
+	CONFIG_NOUVEAU_PLATFORM_DRIVER=y
+  FILES:= \
+	$(LINUX_DIR)/drivers/gpu/drm/nouveau/nouveau.ko \
+	$(LINUX_DIR)/drivers/gpu/drm/scheduler/gpu-sched.ko
+  AUTOLOAD:=$(call AutoProbe,nouveau)
+endef
+
+define KernelPackage/drm-nouveau/description
+ GPU driver for majority of NVIDIA Tegra SoCs.
+endef
+
+$(eval $(call KernelPackage,drm-nouveau))
+
+
+define KernelPackage/drm-tegra
+  SUBMENU:=$(VIDEO_MENU)
+  TITLE:=Tegra DRM driver
+  DEPENDS:=@TARGET_tegra +kmod-backlight +kmod-drm +kmod-drm-display-helper \
+	+kmod-drm-kms-helper +TARGET_tegra_armv8:t210-vic-firmware
+  KCONFIG:= \
+	CONFIG_DRM_TEGRA \
+	CONFIG_DRM_TEGRA_DEBUG=n \
+	CONFIG_DRM_TEGRA_STAGING=n \
+	CONFIG_DRM_FBDEV_EMULATION=y \
+	CONFIG_DRM_FBDEV_OVERALLOC=100 \
+	CONFIG_TEGRA_HOST1X \
+	CONFIG_TEGRA_HOST1X_CONTEXT_BUS=y \
+	CONFIG_TEGRA_HOST1X_FIREWALL=y
+  FILES:= \
+	$(LINUX_DIR)/drivers/gpu/drm/display/drm_dp_aux_bus.ko \
+	$(LINUX_DIR)/drivers/gpu/drm/tegra/tegra-drm.ko \
+	$(LINUX_DIR)/drivers/gpu/host1x/host1x.ko
+  AUTOLOAD:=$(call AutoProbe,host1x tegra-drm)
+endef
+
+define KernelPackage/drm-tegra/description
+ GPU driver for all of NVIDIA Tegra SoCs.
+endef
+
+$(eval $(call KernelPackage,drm-tegra))
+
+
 #
 # Video Capture
 #
diff --git a/target/linux/loongarch64/config-6.6 b/target/linux/loongarch64/config-6.6
index 46a90c128495..bd3e199c11c0 100644
--- a/target/linux/loongarch64/config-6.6
+++ b/target/linux/loongarch64/config-6.6
@@ -367,6 +367,9 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 CONFIG_INPUT_SPARSEKMAP=y
 # CONFIG_IOMMUFD is not set
 # CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
+CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
+# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
 CONFIG_IOMMU_SUPPORT=y
 CONFIG_IO_URING=y
 CONFIG_IRQCHIP=y
diff --git a/target/linux/tegra/image/armv8.mk b/target/linux/tegra/image/armv8.mk
index 2aae94012546..ad3535f23bfa 100644
--- a/target/linux/tegra/image/armv8.mk
+++ b/target/linux/tegra/image/armv8.mk
@@ -3,9 +3,9 @@ define Device/nvidia_jetson-tx1
   DEVICE_MODEL := Jetson TX1 Developer Kit
   DEVICE_DTS := tegra210-p2371-2180
   DEVICE_PACKAGES := brcmfmac-nvram-4354-sdio cypress-firmware-4354-sdio \
-	kmod-bluetooth kmod-brcmfmac kmod-usb-gadget-serial kmod-usb-hid \
-	kmod-usb-net-rtl8152 kmod-usb-udc-tegra kmod-usb-xhci-tegra \
-	wpad-basic-mbedtls
+	kmod-bluetooth kmod-brcmfmac kmod-drm-nouveau kmod-drm-tegra \
+	kmod-usb-gadget-serial kmod-usb-hid kmod-usb-net-rtl8152 \
+	kmod-usb-udc-tegra kmod-usb-xhci-tegra wpad-basic-mbedtls
   SUPPORTED_DEVICES := nvidia,p2371-2180
 endef
 TARGET_DEVICES += nvidia_jetson-tx1
diff --git a/target/linux/zynq/config-6.6 b/target/linux/zynq/config-6.6
index 15716a12cdbc..ed06c2bf45c7 100644
--- a/target/linux/zynq/config-6.6
+++ b/target/linux/zynq/config-6.6
@@ -265,6 +265,9 @@ CONFIG_INPUT_SPARSEKMAP=y
 CONFIG_INPUT_VIVALDIFMAP=y
 # CONFIG_IOMMUFD is not set
 # CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
+CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
+# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
 # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
 # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
 CONFIG_IOMMU_SUPPORT=y
-- 
2.47.0




More information about the openwrt-devel mailing list