Skip to content

Commit

Permalink
meta-lxatac-bsp: linux-lxatac: add workaround for broken fbdev emulation
Browse files Browse the repository at this point in the history
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 <l.goehrs@pengutronix.de>
  • Loading branch information
hnez committed Oct 1, 2024
1 parent 0dc9a95 commit c768d89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion meta-lxatac-bsp/recipes-kernel/linux/files/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c768d89

Please sign in to comment.