AMD Versal AI Edge Series Gen 2 - Mali-G78AE Linux DDK

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

  1. Create a Yocto repository by following the steps mentioned at AMD EDF Getting started.

  2. Creating boot.bin

    • MACHINE=versal-2ve-2vm-vek385-sdt-seg bitbake xilinx-bootbin

  3. Adding custom packages in yocto by adding below lines to build/conf/local.conf

    1. Enabling linuxfb plugin for QT (This is optional step. Only needed to test linuxfb plugin)

      1. IMAGE_INSTALL:append = "packagegroup-xilinx-qt”

      2. PACKAGECONFIG:append:pn-qtbase = " linuxfb"

    2. Enabling Virtual KMS in kernel configuration for running fbdev applications

      1. 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

      2. Add this config file in meta-xilinx/meta-xilinx-core/recipes-kernel/linux/linux-xlnx.inc

  4. Building Image and rootfs

    1. MACHINE=amd-cortexa78-mali-common bitbake edf-linux-disk-image

Example GPU Applications

  1. Installing packages

    1. dnf install packagegroup-core-weston

    2. dnf install glmark2

    3. dnf install packagegroup-xilinx-qt

    4. dnf install kmscube

    5. Installing Opencl loader

      1. dnf install opencl-icd-loader-dev

  2. Selecting the dma_heap node

    1. 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.

    2. If no custom heap name is provided, the default heap name /dev/dma_heap/reserved
      will be used.

    3. DMA heap nodes

      1. RevA
        /dev/dma_heap/cma_reserved@0840000000

      2. RevB
        /dev/dma_heap/cma_reserved@800000000

    4. Exit the login shell and re-login

  3. Update user-space library soft links manually while running externally cross-compiled GPU applications
    cd /usr/lib/
    ln -sf libEGL.so.1 libEGL.so
    ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so
    ln -sf libGLESv2.so.2 libGLESv2.so
    ln -sf libgbm.so.1 libgbm.so

  4. Launching weston

    1. Update weston.service with username to root from weston

      1. sed -i 's/User=weston/User=root/g' /usr/lib/systemd/system/weston.service

    2. amd-edf:/home/amd-edf# systemctl daemon-reload

    3. amd-edf:/home/amd-edf# systemctl start weston

  5. Running glmark2

    1. amd-edf:/home/amd-edf# export XDG_RUNTIME_DIR=/run/

    2. amd-edf:/home/amd-edf# glmark2-es2-wayland

  6. Running kmscube (stop weston before running this)

    1. amd-edf:/home/amd-edf# kmscube

  7. Wayland backend

    1. QT application

      1. export DISPLAY=:0.0
        export XDG_RUNTIME_DIR=/run/
        export QT_QPA_PLATFORM=wayland
        export QT_WAYLAND_SHELL_INTEGRATION=xdg-shell

      2. cd /usr/share/examples/widgets/animation/animatedtiles/
        ./animatedtiles
        cd /usr/share/examples/widgets/animation/stickman/
        ./stickman
        cd /usr/share/examples/widgets/widgets/calculator/
        ./calculator
        cd /usr/share/examples/widgets/widgets/analogclock

        ./analogclock

  8. Fbdev backend (Need to enable VKMS and remove Display port modules)

    1. QT application

      1. eglfs plugin
        export DISPLAY=:0.0
        export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
        export QT_QPA_EGLFS_FB=/dev/fb0
        export QT_QPA_PLATFORM=eglfs::fb=/dev/fb0
        export QT_QPA_GENERIC_PLUGINS=evdevkeyboard,evdevmouse

      2. linuxfb plugin
        export DISPLAY=:0.0
        export QT_QPA_EGLFS_INTEGRATION=linuxfb
        export QT_QPA_PLATFORM=linuxfb::fb=/dev/fb0
        export QT_QPA_EGLFS_FB=/dev/fb0
        export QT_QPA_EGLFS_WIDTH=1920
        export QT_QPA_EGLFS_HEIGHT=1080
        export QT_QPA_GENERIC_PLUGINS=evdevmouse,evdevkeyboard
        export QT_QPA_ENABLE_TERMINAL_KEYBOARD=1
        export QT_QPA_FONTDIR=/usr/share/fonts/
        export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/plugins
        export QML2_IMPORT_PATH=/usr/lib/qml

      3. Running application:
        cd /usr/share/examples/widgets/animation/animatedtiles/
        ./animatedtiles
        cd /usr/share/examples/widgets/animation/stickman/
        ./stickman
        cd /usr/share/examples/widgets/widgets/calculator/
        ./calculator
        cd /usr/share/examples/widgets/widgets/analogclock
        ./analogclock

    2. eglfbdev

      1. export DISPLAY=:0.0

      2. ./eglfbdev -p -f 100000

    3. eglfbdev_gears

      1. export DISPLAY=:0.0

      2. ./eglfbdev_gears -p -f 100000

  9. Headless

    1. glmark2 application

      1. glmark2-es2-gbm --winsys-options drm-device=/dev/dri/card0 --off-screen

Troubleshooting

  1. If GPU kernel modules have not loaded properly.

    1. 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

  2. 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:

    1. modetest -M mmi-dc -s 45:1920x1080-60@XR24

CTS Test results

Mali-G78AE 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

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