Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Runner/config/pkg_command_map.conf
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,11 @@ debian:package-set:graphics=kgsl-dkms adreno-common libgbm-msm1 adreno-gles1 adr
# Upstream Debian Mesa/freedreno userspace required by the default KMSCube run.
debian:package-set:graphics-base=libegl-mesa0 libgl1-mesa-dri libgbm1 libegl1 libgles2 mesa-utils

# TODO on ubuntu
ubuntu:package-set:graphics=kgsl-dkms adreno-common adreno-gles1 adreno-gles2 adreno-egl1 adreno-vulkan-icd adreno-opencl-icd adreno-opencl-dev
# Ubuntu uses the same Mesa/freedreno base userspace as Debian.
ubuntu:package-set:graphics-base=libegl-mesa0 libgl1-mesa-dri libgbm1 libegl1 libgles2 mesa-utils

# Qualcomm proprietary graphics overlay package set for Ubuntu.
ubuntu:package-set:graphics=kgsl-dkms adreno-common libgbm-msm adreno-gles1 adreno-gles2 adreno-egl1 adreno-vulkan-icd adreno-opencl-icd adreno-opencl-dev

# ---------------------------------------------------------------------------
# Audio validation package recovery.
Expand Down
13 changes: 12 additions & 1 deletion Runner/suites/Multimedia/Graphics/KMSCube/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ GPU_BOOT_ARTIFACTS_CHANGED=0

GPU_MODULE="msm_kgsl"
GPU_OVERLAY_DEVICE="/dev/kgsl-3d0"
GPU_OVERLAY_GBM_PACKAGE="${GPU_OVERLAY_GBM_PACKAGE:-libgbm-msm1}"
GPU_OVERLAY_GBM_PACKAGE="${GPU_OVERLAY_GBM_PACKAGE:-}"

DISPLAY_MANAGER_SERVICE="${DISPLAY_MANAGER_SERVICE:-display-manager.service}"
DISPLAY_MANAGER_STATE_FILE="/tmp/qcom-testkit-${TESTNAME}-display-manager.$$.state"
Expand Down Expand Up @@ -114,6 +114,17 @@ fi

[ -n "$OS_ID" ] || OS_ID="unknown"

if [ -z "$GPU_OVERLAY_GBM_PACKAGE" ]; then
case "$OS_ID" in
ubuntu)
GPU_OVERLAY_GBM_PACKAGE="libgbm-msm"
;;
*)
GPU_OVERLAY_GBM_PACKAGE="libgbm-msm1"
;;
esac
fi

case "$OS_ID" in
debian|ubuntu|centos|rhel|fedora)
DISTRO_GPU_HANDLING_SUPPORTED=1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.

SPDX-License-Identifier: BSD-3-Clause# weston-simple-egl GraphicsTest Scripts for Qualcomm Linux based platform (Yocto)
SPDX-License-Identifier: BSD-3-Clause

# weston-simple-egl Graphics Test

# Overview

Graphics scripts automates the validation of Graphics OpenGL ES 2.0 capabilities on the Qualcomm RB3 Gen2 platform running a Yocto-based Linux system. It utilizes Weston-Simple-EGL test app which is publicly available at https://github.com/krh/weston
This suite validates OpenGL ES 2.0 through the `weston-simple-egl` Wayland client on Qualcomm Linux platforms. It supports image-provided Weston on Yocto and active desktop Wayland sessions on Debian-family distributions.

## Features

Expand All @@ -13,11 +16,27 @@ Graphics scripts automates the validation of Graphics OpenGL ES 2.0 capabilities

## Prerequisites

Ensure the following components are present in the target Yocto build:
Yocto images must provide the required client and Weston runtime. On Ubuntu and Debian, the shared package provider ensures the mapped Weston and graphics packages.

- `weston-simple-egl` (Binary Available in /usr/bin) be default
- Write access to root filesystem (for environment setup)

## Desktop distribution modes

- `./run.sh --base` selects the upstream MSM/freedreno stack and ensures the OS-specific Mesa package set.
- `./run.sh --overlay` selects the Qualcomm KGSL/Adreno stack and ensures the OS-specific overlay package set. Package or DKMS changes can require a reboot before validation continues.
- Debian uses `libgbm-msm1`, while Ubuntu uses `libgbm-msm`. Set `GPU_OVERLAY_GBM_PACKAGE` only when an explicit override is required.
- On Ubuntu, the test reuses an active GNOME Wayland session when Weston is not running. A root-launched test executes the client as the Wayland socket owner without stopping or restarting GDM.
- GDM can throttle an unfocused greeter client. That path validates compositor connectivity and EGL startup while recording, but not performance-gating, any FPS samples.

Examples:

```sh
./run.sh --base
./run.sh --overlay
./run.sh --auto
```

## Directory Structure

```
Expand Down
81 changes: 68 additions & 13 deletions Runner/suites/Multimedia/Graphics/weston-simple-egl/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ALLOW_RELAUNCH="${ALLOW_RELAUNCH:-0}"

GPU_MODULE="${GPU_MODULE:-msm_kgsl}"
GPU_OVERLAY_DEVICE="${GPU_OVERLAY_DEVICE:-/dev/kgsl-3d0}"
GPU_OVERLAY_GBM_PACKAGE="${GPU_OVERLAY_GBM_PACKAGE:-libgbm-msm1}"
GPU_OVERLAY_GBM_PACKAGE="${GPU_OVERLAY_GBM_PACKAGE:-}"

OS_ID="unknown"
DISTRO_GPU_HANDLING_SUPPORTED=0
Expand Down Expand Up @@ -287,6 +287,17 @@ fi

[ -n "$OS_ID" ] || OS_ID="unknown"

if [ -z "$GPU_OVERLAY_GBM_PACKAGE" ]; then
case "$OS_ID" in
ubuntu)
GPU_OVERLAY_GBM_PACKAGE="libgbm-msm"
;;
*)
GPU_OVERLAY_GBM_PACKAGE="libgbm-msm1"
;;
esac
fi

case "$OS_ID" in
debian|ubuntu|centos|rhel|fedora)
DISTRO_GPU_HANDLING_SUPPORTED=1
Expand Down Expand Up @@ -442,17 +453,19 @@ fi

case "$OS_ID" in
debian|ubuntu|centos|rhel|fedora)
if ! command -v weston_prepare_runtime >/dev/null 2>&1; then
if [ "$OS_ID" = "ubuntu" ] &&
command -v display_adopt_gnome_wayland_session >/dev/null 2>&1 &&
display_adopt_gnome_wayland_session; then
log_info "Using the active GNOME Wayland session for onscreen EGL validation"
elif ! command -v weston_prepare_runtime >/dev/null 2>&1; then
log_fail "$TESTNAME FAIL - weston_prepare_runtime helper is unavailable"
echo "$TESTNAME FAIL" >"$RES_FILE"
exit 0
fi

if ! weston_prepare_runtime \
"$TESTNAME" \
"$WAIT_SECS" \
client \
"$ALLOW_RELAUNCH"; then
elif ! weston_prepare_runtime \
"$TESTNAME" \
"$WAIT_SECS" \
client \
"$ALLOW_RELAUNCH"; then
log_fail "$TESTNAME FAIL - no usable managed Weston runtime is available for onscreen EGL clients"
echo "$TESTNAME FAIL" >"$RES_FILE"
exit 0
Expand Down Expand Up @@ -501,6 +514,15 @@ if ! display_resolve_test_fps_gate_policy \
exit 0
fi

if [ "${DISPLAY_RUNTIME_MODEL:-}" = "desktop-gnome-session" ]; then
# GDM intentionally throttles non-interactive greeter clients, so their
# compositor frame cadence is not a display-refresh or GPU-performance
# measurement. The client connection and EGL startup remain validated.
DISPLAY_TEST_FPS_POLICY="desktop-session-connectivity"
export DISPLAY_TEST_FPS_POLICY
log_info "FPS policy, desktop-session-connectivity, GNOME greeter throttling is not performance evidence"
fi

if [ "${DISPLAY_TEST_FPS_POLICY:-shared}" = "desktop-functional-cap" ]; then
log_info "FPS policy, desktop-functional-cap"
log_info "Detected output refresh, ${DISPLAY_TEST_FPS_REFRESH:-unknown}Hz"
Expand Down Expand Up @@ -567,8 +589,9 @@ fi

log_info "Using client binary, $BIN"
log_info "Wayland socket, ${DISPLAY_WAYLAND_SOCKET:-<unknown>}"
log_info "XDG_RUNTIME_DIR, ${XDG_RUNTIME_DIR:-<unset>}"
log_info "WAYLAND_DISPLAY, ${WAYLAND_DISPLAY:-<unset>}"
log_info "Wayland session user, ${DISPLAY_WAYLAND_SESSION_USER:-current-user}"
log_info "XDG_RUNTIME_DIR, ${DISPLAY_WAYLAND_SESSION_RUNTIME_DIR:-${XDG_RUNTIME_DIR:-<unset>}}"
log_info "WAYLAND_DISPLAY, $(basename "${DISPLAY_WAYLAND_SOCKET:-${WAYLAND_DISPLAY:-<unset>}}")"

log_info "Client mode, compositor-synchronized weston-simple-egl"
# Retain the existing environment on Yocto. Upstream weston-simple-egl prints
Expand All @@ -592,9 +615,32 @@ rc=0
if command -v run_with_timeout >/dev/null 2>&1; then
log_info "Using run_with_timeout"

if command -v stdbuf >/dev/null 2>&1; then
if [ -n "${DISPLAY_WAYLAND_SESSION_USER:-}" ] &&
command -v timeout >/dev/null 2>&1; then
log_info "Using session-local timeout to reap the desktop Wayland client"

if command -v stdbuf >/dev/null 2>&1; then
display_run_in_wayland_session \
timeout \
"$DURATION" \
stdbuf \
-oL \
-eL \
"$BIN" >>"$RUN_LOG" 2>&1
rc=$?
else
log_warn "stdbuf is unavailable, running the client without line buffering"

display_run_in_wayland_session \
timeout \
"$DURATION" \
"$BIN" >>"$RUN_LOG" 2>&1
rc=$?
fi
elif command -v stdbuf >/dev/null 2>&1; then
run_with_timeout \
"$DURATION" \
display_run_in_wayland_session \
stdbuf \
-oL \
-eL \
Expand All @@ -605,6 +651,7 @@ if command -v run_with_timeout >/dev/null 2>&1; then

run_with_timeout \
"$DURATION" \
display_run_in_wayland_session \
"$BIN" >>"$RUN_LOG" 2>&1
rc=$?
fi
Expand All @@ -624,7 +671,7 @@ else
[ -n "$duration_secs" ] || duration_secs=30
[ -n "$stop_grace_secs" ] || stop_grace_secs=3

"$BIN" >>"$RUN_LOG" 2>&1 &
display_run_in_wayland_session "$BIN" >>"$RUN_LOG" 2>&1 &
APP_PID=$!
run_elapsed=0

Expand Down Expand Up @@ -713,6 +760,8 @@ fi

if [ "${DISPLAY_TEST_FPS_POLICY:-shared}" = "desktop-functional-cap" ]; then
log_info "Result summary, rc=${rc} elapsed=${elapsed}s fps=${fps_for_summary} mode=desktop-functional refresh=${DISPLAY_TEST_FPS_REFRESH:-unknown}Hz target=${DISPLAY_TEST_FPS_EXPECTED:-unknown} min_ok=${DISPLAY_TEST_FPS_MIN_OK:-unknown} graphics=${DISPLAY_BUILD_FLAVOUR} source=client-synchronized"
elif [ "${DISPLAY_TEST_FPS_POLICY:-shared}" = "desktop-session-connectivity" ]; then
log_info "Result summary, rc=${rc} elapsed=${elapsed}s fps=${fps_for_summary} mode=desktop-session-connectivity graphics=${DISPLAY_BUILD_FLAVOUR} source=client-synchronized"
elif [ "${DISPLAY_FPS_MODE:-}" = "detected" ]; then
log_info "Result summary, rc=${rc} elapsed=${elapsed}s fps=${fps_for_summary} mode=${DISPLAY_FPS_MODE} refresh=${DISPLAY_FPS_DETECTED_HZ}Hz expected=${DISPLAY_FPS_EXPECTED} min_ok=${DISPLAY_FPS_MIN_OK} graphics=${DISPLAY_BUILD_FLAVOUR} source=client-synchronized"
else
Expand All @@ -724,6 +773,12 @@ final="PASS"
case "$rc" in
0|143)
;;
124)
if [ "${DISPLAY_RUNTIME_MODEL:-}" != "desktop-gnome-session" ]; then
log_fail "$TESTNAME execution timed out unexpectedly, rc=$rc runtime=${DISPLAY_RUNTIME_MODEL:-unknown}"
final="FAIL"
fi
;;
*)
log_fail "$TESTNAME execution failed, rc=$rc"
final="FAIL"
Expand Down
13 changes: 12 additions & 1 deletion Runner/suites/Multimedia/Graphics/weston-simple-shm/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ALLOW_RELAUNCH="${ALLOW_RELAUNCH:-0}"
REQUESTED_GRAPHICS_MODE="default"
GPU_MODULE="${GPU_MODULE:-msm_kgsl}"
GPU_OVERLAY_DEVICE="${GPU_OVERLAY_DEVICE:-/dev/kgsl-3d0}"
GPU_OVERLAY_GBM_PACKAGE="${GPU_OVERLAY_GBM_PACKAGE:-libgbm-msm1}"
GPU_OVERLAY_GBM_PACKAGE="${GPU_OVERLAY_GBM_PACKAGE:-}"
CLIENT_PID=""

while [ "$#" -gt 0 ]; do
Expand Down Expand Up @@ -153,6 +153,17 @@ elif [ -r /etc/os-release ]; then
fi
[ -n "$OS_ID" ] || OS_ID="unknown"

if [ -z "$GPU_OVERLAY_GBM_PACKAGE" ]; then
case "$OS_ID" in
ubuntu)
GPU_OVERLAY_GBM_PACKAGE="libgbm-msm"
;;
*)
GPU_OVERLAY_GBM_PACKAGE="libgbm-msm1"
;;
esac
fi

DISTRO_GPU_HANDLING_SUPPORTED=0
case "$OS_ID" in
debian|ubuntu|centos|rhel|fedora)
Expand Down
Loading
Loading