From f25a3c44d0c46d0b2bc552ede316993742263457 Mon Sep 17 00:00:00 2001 From: Jan Vermaete Date: Sun, 11 May 2025 11:30:05 +0200 Subject: [PATCH 1/2] fixing X11 at Raspberry Pi5 See: https://github.com/agherzan/meta-raspberrypi/issues/1426 Signed-off-by: Jan Vermaete --- conf/machine/raspberrypi5.conf | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 5 +++++ .../xorg-xserver/xserver-xf86-config/99-vc4.conf | 6 ++++++ .../xorg-xserver/xserver-xf86-config_%.bbappend | 10 ++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/99-vc4.conf diff --git a/conf/machine/raspberrypi5.conf b/conf/machine/raspberrypi5.conf index 636c965af..6add58ef8 100644 --- a/conf/machine/raspberrypi5.conf +++ b/conf/machine/raspberrypi5.conf @@ -24,7 +24,7 @@ RPI_KERNEL_DEVICETREE = " \ SDIMG_KERNELIMAGE ?= "kernel_2712.img" SERIAL_CONSOLES ?= "115200;ttyAMA10" -VC4DTBO ?= "vc4-kms-v3d" +VC4DTBO ?= "vc4-kms-v3d-pi5" # When u-boot is enabled we need to use the "Image" format and the "booti" # command to load the kernel diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb index 0140f30fe..31ed43799 100644 --- a/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/recipes-bsp/bootfiles/rpi-config_git.bb @@ -336,6 +336,11 @@ do_deploy:append:raspberrypi3-64() { echo "dtparam=audio=on" >> $CONFIG } +do_deploy:append:raspberrypi5() { + echo "max_framebuffers=2" >> $CONFIG + echo "disable_fw_kms_setup=1" >> $CONFIG +} + do_deploy:append() { if grep -q -E '^.{80}.$' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt; then bbwarn "config.txt contains lines longer than 80 characters, this is not supported" diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/99-vc4.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/99-vc4.conf new file mode 100644 index 000000000..ed3e255d8 --- /dev/null +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/99-vc4.conf @@ -0,0 +1,6 @@ +Section "OutputClass" + Identifier "vc4" + MatchDriver "vc4" + Driver "modesetting" + Option "PrimaryGPU" "true" +EndSection diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend b/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend index aebe1f9a1..eebab84bd 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend @@ -4,6 +4,11 @@ SRC_URI:append:rpi = " \ file://xorg.conf.d/98-pitft.conf \ file://xorg.conf.d/99-calibration.conf \ " + +SRC_URI:append:raspberrypi5 = " \ + file://99-vc4.conf \ +" + do_install:append:rpi () { PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" if [ "${PITFT}" = "1" ]; then @@ -13,4 +18,9 @@ do_install:append:rpi () { fi } +do_install:append:raspberrypi5 () { + install -d ${D}/${sysconfdir}/X11/xorg.conf.d/ + install -m 0644 ${S}/99-vc4.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ +} + FILES:${PN}:append:rpi = " ${sysconfdir}/X11/xorg.conf.d/*" From c4053fa553a9112d7c1e98c4e1f659e64cce60e0 Mon Sep 17 00:00:00 2001 From: Jan Vermaete Date: Sun, 11 May 2025 11:32:36 +0200 Subject: [PATCH 2/2] mesa: removed the no longer existing dri3 DISTRO_FEATURE Signed-off-by: Jan Vermaete --- recipes-graphics/mesa/mesa.bbappend | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/recipes-graphics/mesa/mesa.bbappend b/recipes-graphics/mesa/mesa.bbappend index c2bab27f9..85a0ad366 100644 --- a/recipes-graphics/mesa/mesa.bbappend +++ b/recipes-graphics/mesa/mesa.bbappend @@ -1,6 +1,2 @@ -# DRI3 note: -# With oe-core commit 8509e2e1a87578882b71948ccef3b50ccf1228b3 dri3 is set -# as default. To state out clearly that Raspi needs dri3 and to avoid surprises -# in case oe-core changes this default, we set dri3 explicitly. -PACKAGECONFIG:append:rpi = " gallium vc4 v3d ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'vulkan broadcom', '', d)}" +PACKAGECONFIG:append:rpi = " gallium vc4 v3d ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'vulkan broadcom', '', d)}" DRIDRIVERS:class-target:rpi = ""