mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 16:24:17 -09:00
Release notes: https://lists.freedesktop.org/archives/mesa-announce/2024-May/000762.html https://lists.freedesktop.org/archives/mesa-announce/2024-June/000763.html https://lists.freedesktop.org/archives/mesa-announce/2024-June/000765.html https://lists.freedesktop.org/archives/mesa-announce/2024-July/000766.html https://lists.freedesktop.org/archives/mesa-announce/2024-July/000767.html https://lists.freedesktop.org/archives/mesa-announce/2024-July/000771.html https://lists.freedesktop.org/archives/mesa-announce/2024-August/000773.html https://lists.freedesktop.org/archives/mesa-announce/2024-August/000776.html https://lists.freedesktop.org/archives/mesa-announce/2024-September/000778.html https://lists.freedesktop.org/archives/mesa-announce/2024-September/000779.html https://lists.freedesktop.org/archives/mesa-announce/2024-October/000780.html https://lists.freedesktop.org/archives/mesa-announce/2024-October/000781.html https://lists.freedesktop.org/archives/mesa-announce/2024-October/000782.html https://lists.freedesktop.org/archives/mesa-announce/2024-November/000784.html https://lists.freedesktop.org/archives/mesa-announce/2024-November/000786.html https://lists.freedesktop.org/archives/mesa-announce/2024-December/000788.html https://docs.mesa3d.org/relnotes/24.3.2.html https://docs.mesa3d.org/relnotes/24.3.3.html https://docs.mesa3d.org/relnotes/24.3.4.html https://lists.freedesktop.org/archives/mesa-announce/2025-February/000793.html https://lists.freedesktop.org/archives/mesa-announce/2025-March/000794.html https://lists.freedesktop.org/archives/mesa-announce/2025-March/000795.html https://lists.freedesktop.org/archives/mesa-announce/2025-April/000796.html https://lists.freedesktop.org/archives/mesa-announce/2025-April/000798.html https://lists.freedesktop.org/archives/mesa-announce/2025-April/000801.html https://lists.freedesktop.org/archives/mesa-announce/2025-May/000803.html ------------------------------------------------------------------------ Changes needed for the bump to 24.1.x: Added dependency to llvm & Co. for iris driver due to upstream commit: https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=a512c2a8b572c5da360873320dbbd343c6223cd6 Added host version of mesa tool intel_clc needed for target build of the iris driver. Added dependency to host-python-pycparser for etnaviv driver due to upstream commit: https://cgit.freedesktop.org/mesa/mesa/commit/src/etnaviv/hwdb/meson.build?h=24.1&id=2192e620bb0c68b75ff45165d0b117c7ecb77268 Added dependency to host-python-ply for intel vulkan driver due to upstream commit: https://cgit.freedesktop.org/mesa/mesa/commit/src/intel/vulkan/grl/meson.build?h=24.1&id=dc1aedef2bd054884685ad971a3ef5be07ecd101 Although this dependency exists since mesa3d 22.3 it is only needed when intel-clc is enabled, this dependency is added with this patch so no need to backport this dependency to older buildroot trees. Update configure parameter of glvnd option due to upstream commit: https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=4f25b84b2460524d375424a81b42faa4d99c8e60 ------------------------------------------------------------------------ Changes needed for the bump to 24.2.x: Added dependency to host-python-pyyaml to host and target build, needed due to upstream commita381332757Rebased patch 0002 due to upstream commit: https://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/drivers/vc4/meson.build?h=24.2&id=da70827656757cd070faac7aff5ca057f1e7fb8a Renamed BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST to BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE (also updated tests) and added new option BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LLVMPIPE due to upstream commit010b2f9497"gallium/meson: Deconflate swrast/softpipe/llvmpipe" Also, the test_glxinfo.py now needs GBM to work. Since GBM depends on EGL (which also selects GBM), this commit adds BR2_PACKAGE_MESA3D_OPENGL_EGL=y to this glxinfo runtime test config. Without this, glxinfo fails with an error such as: Error: couldn't find RGB GLX visual or fbconfig This is related to upstream cleanups such as:93511c1c5cThanks to El Mehdi YOUNES <elmehdi.younes@smile.fr> for pointing that out. ------------------------------------------------------------------------ Changes needed for the bump to 24.3.x: Rebased patch 0002 again due to upstream commit:25ba90fd88Removed dri3 configure option:8f6fca89aaRemoved gallium-omx configure option:9b6c27a320Removed gallium kmsro configure option:89863a050b70813c1c13No legacy option needed due to automatic handling by the mesa build system: "Automatically include it if we're building with a driver that depends on it, and don't include it if we're not." ------------------------------------------------------------------------ Changes needed for the bump to 25.0.x: Rebased patch 0001, added license files and updated license hash due to upstream commits which restructured the license files:69849bc4d1 (e672208340b30f973cdab11421f1c91b39d5c02e)c22d640fe9Removed configure option opencl-spirv due to upstream commit:80c4ffb61aUpdated configure options for host-build clc which was also renamed from intel_clc to mesa_clc, added host version of vtn_bindgen: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3271913fe5a597b5ddeea9a62Signed-off-by: Bernd Kuhls <bernd@kuhls.net> [Julien: add BR2_PACKAGE_MESA3D_OPENGL_EGL=y to test_glxinfo config to fix the runtime test] Signed-off-by: Julien Olivain <ju.o@free.fr>
154 lines
6.1 KiB
Python
154 lines
6.1 KiB
Python
import os
|
|
import time
|
|
|
|
import infra.basetest
|
|
from ..graphics_base import GraphicsBase
|
|
|
|
|
|
class TestWeston(infra.basetest.BRTest, GraphicsBase):
|
|
config = \
|
|
"""
|
|
BR2_aarch64=y
|
|
BR2_TOOLCHAIN_EXTERNAL=y
|
|
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
|
|
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
|
|
BR2_ROOTFS_OVERLAY="{}"
|
|
BR2_PER_PACKAGE_DIRECTORIES=y
|
|
BR2_LINUX_KERNEL=y
|
|
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
|
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.44"
|
|
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
|
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
|
|
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}"
|
|
BR2_PACKAGE_LIBDRM=y
|
|
BR2_PACKAGE_MESA3D=y
|
|
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
|
|
BR2_PACKAGE_MESA3D_LLVM=y
|
|
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
|
|
BR2_PACKAGE_MESA3D_OPENGL_ES=y
|
|
BR2_PACKAGE_WAYLAND_UTILS=y
|
|
BR2_PACKAGE_WESTON=y
|
|
BR2_PACKAGE_WESTON_SIMPLE_CLIENTS=y
|
|
BR2_TARGET_ROOTFS_CPIO=y
|
|
BR2_TARGET_ROOTFS_CPIO_GZIP=y
|
|
# BR2_TARGET_ROOTFS_TAR is not set
|
|
""".format(
|
|
infra.filepath("tests/package/test_weston/overlay"),
|
|
infra.filepath("tests/package/test_weston/linux-vkms.fragment")
|
|
)
|
|
|
|
def start_weston(self):
|
|
self.assertRunOk("export XDG_RUNTIME_DIR=/tmp")
|
|
|
|
cmd = "( weston"
|
|
cmd += " --config=/etc/weston.ini"
|
|
cmd += " --continue-without-input"
|
|
cmd += " --log=/tmp/weston.log"
|
|
cmd += " &> /dev/null & )"
|
|
self.assertRunOk(cmd)
|
|
|
|
self.assertRunOk("export WAYLAND_DISPLAY=wayland-1")
|
|
|
|
def wait_for_weston(self):
|
|
# We wait for the wayland socket to appear...
|
|
wayland_socket = "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}"
|
|
cmd = f"while [ ! -e \"{wayland_socket}\" ] ; do sleep 1 ; done"
|
|
self.assertRunOk(cmd, timeout=10)
|
|
time.sleep(4)
|
|
|
|
def stop_weston(self):
|
|
cmd = "killall weston"
|
|
self.assertRunOk(cmd)
|
|
time.sleep(3)
|
|
|
|
def test_run(self):
|
|
img = os.path.join(self.builddir, "images", "rootfs.cpio.gz")
|
|
kern = os.path.join(self.builddir, "images", "Image")
|
|
self.emulator.boot(arch="aarch64",
|
|
kernel=kern,
|
|
kernel_cmdline=["console=ttyAMA0", "vt.global_cursor_default=0"],
|
|
options=["-M", "virt",
|
|
"-cpu", "cortex-a57",
|
|
"-smp", "4",
|
|
"-m", "512M",
|
|
"-initrd", img])
|
|
self.emulator.login()
|
|
|
|
# This test uses the vkms DRM Kernel driver. This driver can
|
|
# generate kernel warning messages in some cases (e.g. "vblank
|
|
# timer overrun"). Those messages can happen on slow test
|
|
# runners. This warning is not an issue in this test: it is
|
|
# not checking performance here; it just checks the rendering
|
|
# pipeline is functional. For that reason, this test adds the
|
|
# file "/etc/default/klogd" to only show emergency messages
|
|
# (level value 0) on the console.
|
|
|
|
# Check the weston binary can execute
|
|
self.assertRunOk("weston --version")
|
|
|
|
self.start_weston()
|
|
self.wait_for_weston()
|
|
|
|
# Check a simple info client can communicate with the compositor
|
|
self.assertRunOk("wayland-info", timeout=10)
|
|
|
|
# We get 10 consecutive DRM frame CRCs and count how many
|
|
# unique CRCs we have. Since weston is supposed to run idle,
|
|
# we should have 10 times the same display CRC.
|
|
self.assertTrue(len(self.get_n_fb_crc(uniq=True)) == 1)
|
|
|
|
# We save the CRC value of an empty weston desktop for
|
|
# later...
|
|
weston_desktop_crc = self.get_n_fb_crc(count=1)[0]
|
|
|
|
# We start the weston-simple-egl in background... Every
|
|
# rendered frame is supposed to be different (as the triangle
|
|
# animation is derived from the system time). Since all the
|
|
# rendering (client application and compositor) is in
|
|
# software, we sleep a bit to let those program to settle.
|
|
self.assertRunOk("( weston-simple-egl >/dev/null 2>&1 & )")
|
|
|
|
# Since the weston-simple-egl client is supposed to run and
|
|
# display something, we are now supposed to measure a
|
|
# different display CRC than the one we measured when the
|
|
# desktop was empty.
|
|
for i in range(600):
|
|
crc = self.get_n_fb_crc(count=1)[0]
|
|
if crc != weston_desktop_crc:
|
|
break
|
|
time.sleep(1)
|
|
self.assertNotEqual(crc, weston_desktop_crc)
|
|
|
|
# While weston-simple-egl is running, we check the VKMS DRM
|
|
# CRCs are now changing. We get many CRCs, one per display
|
|
# driver refresh (at ~60Hz). Since all the rendering is in
|
|
# software, we can expect a slow frame rate. In 300 captured
|
|
# CRCs (5s), we expect at least 5 different values (i.e. 1 fps).
|
|
# This guarantees the rendering pipeline is working, while we
|
|
# remain very permissive to slow emulation situations.
|
|
# Increase timeout, as the command is expected to run about 5s,
|
|
# which is the default timeout.
|
|
crcs = self.get_n_fb_crc(count=300, timeout=10)
|
|
self.assertGreaterEqual(len(crcs), 5)
|
|
|
|
# We stop weston-simple-egl, and sleep a bit to let Weston do
|
|
# its cleanup and desktop repaint refresh...
|
|
self.assertRunOk("killall weston-simple-egl")
|
|
|
|
# After we stopped the application, we should have the initial
|
|
# weston desktop background. The CRC we measure now should be
|
|
# the same as the one we saved earlier.
|
|
for i in range(600):
|
|
crc = self.get_n_fb_crc(count=1)[0]
|
|
if crc == weston_desktop_crc:
|
|
break
|
|
time.sleep(1)
|
|
self.assertEqual(crc, weston_desktop_crc)
|
|
|
|
self.stop_weston()
|
|
|
|
# Now weston is supposed to be stopped,
|
|
# a simple client is expected to fail.
|
|
_, exit_code = self.emulator.run("wayland-info")
|
|
self.assertNotEqual(exit_code, 0)
|