AMD Versal AI Edge Series Gen 2 - Mali-G78AE Linux DDK
The purpose of this page is to describe how the ARM MALI-G78AE Linux driver and user-space drivers are integrated into AMD Versal AI Edge Series Gen 2 and Versal Prime Series Gen 2 devices.
GPU SW Stack Overview and Features
Versal AI Edge Series Gen 2 SoC uses Arm® Mali-G78AE GPU for 2D/3D graphics acceleration. Mali-G78AE is the second generation Valhall architecture-based GPU and first to be developed for autonomous use cases to suit both automotive and industrial applications.
Refer to UG1784 for more details about Software stack and IP features.
Driver Access & License Information
https://developer.arm.com/-/media/Files/downloads/mali-drivers/kernel/mali-valhall-gpu/VX504X08X-SW-99002-r51p0-00eac0.tar
https://developer.arm.com/-/media/Files/downloads/mali-drivers/arbitration/ArbitrationReferenceCodeValhall/VX501X08X-SW-99007-r51p0-00eac0.tar
Yocto Build Steps
Create a Yocto repository by following the steps mentioned at AMD EDF Getting started.
Creating boot.bin
MACHINE=versal-2ve-2vm-vek385-sdt-seg bitbake xilinx-bootbin
Adding custom packages in yocto by adding below lines to build/conf/local.conf
Enabling linuxfb plugin for QT (This is optional step. Only needed to test linuxfb plugin)
IMAGE_INSTALL:append = "packagegroup-xilinx-qt”PACKAGECONFIG:append:pn-qtbase = " linuxfb"
Enabling Virtual KMS in kernel configuration for running fbdev applications
Add config file with VKMS kernel config at meta-xilinx/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/config_changes.cfg
CONFIG_DRM_VKMS=y
Add this config file in meta-xilinx/meta-xilinx-core/recipes-kernel/linux/linux-xlnx.inc
SRC_URI += "file://config_changes.cfg "
Building Image and rootfs
MACHINE=amd-cortexa78-mali-common bitbake edf-linux-disk-image
Example GPU Applications
Installing packages
dnf install packagegroup-core-westondnf install glmark2dnf install packagegroup-xilinx-qtdnf install kmscubeInstalling Opencl loader
dnf install opencl-icd-loader-dev
Selecting the dma_heap node
For example, if the heap node is /dev/dma_heap/cma_reserved@0840000000,
users should set the environment variable as follows:
AMD_HEAPS_MEMORY_HEAP_NAME="cma_reserved@0840000000" in /etc/environment.If no custom heap name is provided, the default heap name /dev/dma_heap/reserved
will be used.DMA heap nodes
RevA
/dev/dma_heap/cma_reserved@0840000000RevB
/dev/dma_heap/cma_reserved@800000000
Exit the login shell and re-login
Update user-space library soft links manually while running externally cross-compiled GPU applications
cd /usr/lib/ln -sf libEGL.so.1 libEGL.soln -sf libGLESv1_CM.so.1 libGLESv1_CM.soln -sf libGLESv2.so.2 libGLESv2.soln -sf libgbm.so.1 libgbm.soLaunching weston
Update weston.service with username to root from weston
sed -i 's/User=weston/User=root/g' /usr/lib/systemd/system/weston.service
amd-edf:/home/amd-edf#systemctl daemon-reloadamd-edf:/home/amd-edf#systemctl start weston
Running glmark2
amd-edf:/home/amd-edf#export XDG_RUNTIME_DIR=/run/amd-edf:/home/amd-edf#glmark2-es2-wayland
Running kmscube (stop weston before running this)
amd-edf:/home/amd-edf#kmscube
Wayland backend
QT application
export DISPLAY=:0.0export XDG_RUNTIME_DIR=/run/export QT_QPA_PLATFORM=waylandexport QT_WAYLAND_SHELL_INTEGRATION=xdg-shellcd /usr/share/examples/widgets/animation/animatedtiles/./animatedtilescd /usr/share/examples/widgets/animation/stickman/./stickmancd /usr/share/examples/widgets/widgets/calculator/./calculatorcd /usr/share/examples/widgets/widgets/analogclock./analogclock
Fbdev backend (Need to enable VKMS and remove Display port modules)
QT application
eglfs plugin
export DISPLAY=:0.0export QT_QPA_EGLFS_INTEGRATION=eglfs_kmsexport QT_QPA_EGLFS_FB=/dev/fb0export QT_QPA_PLATFORM=eglfs::fb=/dev/fb0export QT_QPA_GENERIC_PLUGINS=evdevkeyboard,evdevmouselinuxfb plugin
export DISPLAY=:0.0export QT_QPA_EGLFS_INTEGRATION=linuxfbexport QT_QPA_PLATFORM=linuxfb::fb=/dev/fb0export QT_QPA_EGLFS_FB=/dev/fb0export QT_QPA_EGLFS_WIDTH=1920export QT_QPA_EGLFS_HEIGHT=1080export QT_QPA_GENERIC_PLUGINS=evdevmouse,evdevkeyboardexport QT_QPA_ENABLE_TERMINAL_KEYBOARD=1export QT_QPA_FONTDIR=/usr/share/fonts/export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/pluginsexport QML2_IMPORT_PATH=/usr/lib/qmlRunning application:
cd /usr/share/examples/widgets/animation/animatedtiles/./animatedtilescd /usr/share/examples/widgets/animation/stickman/./stickmancd /usr/share/examples/widgets/widgets/calculator/./calculatorcd /usr/share/examples/widgets/widgets/analogclock./analogclock
eglfbdev
export DISPLAY=:0.0./eglfbdev -p -f 100000
eglfbdev_gears
export DISPLAY=:0.0./eglfbdev_gears -p -f 100000
Headless
glmark2 application
glmark2-es2-gbm --winsys-options drm-device=/dev/dri/card0 --off-screen
Troubleshooting
If GPU kernel modules have not loaded properly.
Make sure kernel modules are loaded properly and /dev/mali0 node is populated before executing GPU applications; if not then try removing all GPU kernel modules and reloading again using the below commands:
rmmod /lib/modules/{kernel_version}/*.ko/usr/bin/load-mali-modules.sh
Make sure that the MMI-DC display is up before running GPU apps. You can run the modetest pattern to confirm display sanity, for example:
modetest -M mmi-dc -s 45:1920x1080-60@XR24
CTS Test results
Release Notes
2025.1
Supports ARM Mali Linux DDK r51p0-00eac0
Supports OpenGLES 3.2, Vulkan 1.2 and OpenCL 3.0 APIs
Supports Wayland (Default), FBDev and Headless backends
GPU Multi-Partition support (2 partitions)
2025.2
Features:
Add support for selecting a specific /dev/dma_heap region.
Add support for updating max GPU clock without DVFS
VK_KHR_wayland_surface extension support for Vulkan applications
Fixes:
Fixing GPU modules autoload issue
Fixing GPU translation fault issues
Switch to OpenCL ICD Loader
Filter libs now referencing libmail with version suffix ".0" in FILTER dynamic section.
Known Issues
S No | Issue Description | Work-around | Comments/AR link |
|---|---|---|---|
1 | Out of memory issue while running gfxbench usecase | Reload the kernel modules |
|
2 | GPU libraries symlinks are stripped while building project | Update symlinks manually |
|
3 | CTS testcases are failing for OpenGLES and Vulkan | None |
|
© 2025 Advanced Micro Devices, Inc. Privacy Policy