From 73d42677906d742f7e9e5fd89b38336187a0df56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Tue, 17 Sep 2024 15:22:06 +0200 Subject: [PATCH] meta-lxatac-bsp: linux-lxatac: add workaround for broken fbdev emulation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starting with commit 86634fa4e6aef ("Merge v6.10-rc6 into drm-next") the tacd fails to write to the /dev/fb0 device with a SIGBUS error. This merge commit is the first affected commit because it brings together these two commits for the first time: - commit 9317ff69170d3 ("drm/tiny/panel-mipi-dbi: Use fbdev-dma") - commit d92a7580392ad ("drm/fbdev-dma: Only set smem_start is enable per module option") The first one changes panel-mipi-dbi from being a `drm_fbdev_generic` device to being a `drm_fbdev_dma` device. The second one prevents `drm_fbdev_dma` devices from leaking the memory address of the framebuffer to userspace unless the `drm_kms_helper.drm_leak_fbdev_smem=1` kernel commandline option is set. This being an issue is likely a bug in the panel-mipi-dbi driver that should be fixed there, but this workaround makes sure we can use 6.11 until the driver is fixed. Signed-off-by: Leonard Göhrs --- .../recipes-core/images/lxatac-core-image-base.bbappend | 7 ++++++- meta-lxatac-bsp/recipes-kernel/linux/files/defconfig | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/meta-lxatac-bsp/recipes-core/images/lxatac-core-image-base.bbappend b/meta-lxatac-bsp/recipes-core/images/lxatac-core-image-base.bbappend index af458bcd..da8baffa 100644 --- a/meta-lxatac-bsp/recipes-core/images/lxatac-core-image-base.bbappend +++ b/meta-lxatac-bsp/recipes-core/images/lxatac-core-image-base.bbappend @@ -1,7 +1,12 @@ inherit bootspec BOOTSPEC_EXTRALINE = "linux-appendroot true\n" -BOOTSPEC_OPTIONS += "rootwait" + +# The drm_leak_fbdev_smem option is a workaround required since Linux 6.11 +# because without it the tacd will crash when attempting to write to the +# framebuffer. This is likely a bug in the panel-mipi-dbi driver or the tacd +# that should be fixed there. +BOOTSPEC_OPTIONS += "rootwait drm_kms_helper.drm_leak_fbdev_smem=1" IMAGE_INSTALL:append = "\ kernel-image \ diff --git a/meta-lxatac-bsp/recipes-kernel/linux/files/defconfig b/meta-lxatac-bsp/recipes-kernel/linux/files/defconfig index a3cfcf07..2be5b850 100644 --- a/meta-lxatac-bsp/recipes-kernel/linux/files/defconfig +++ b/meta-lxatac-bsp/recipes-kernel/linux/files/defconfig @@ -3826,7 +3826,7 @@ CONFIG_DRM_KMS_HELPER=y # CONFIG_DRM_DEBUG_MODESET_LOCK is not set CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_FBDEV_OVERALLOC=100 -# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set +CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM=y # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set CONFIG_DRM_GEM_DMA_HELPER=y