3.6.1. Introduction

TI SOCs like AM335x, AM437x, AM57xx and AM65xx are enabled with 3D cores, capable of accelerating 3D operations with dedicated hardware. The dedicated hardware is based on SGX series of devices from Imagination Technologies. The graphics cores only accelerate graphics operations, and do not perform video decode operations. For video acceleration, refer to respective Technical Reference Manuals for the SOCs.

Below table lists the various TI families supported by this SDK, and the SGX core information

Table 3.1 TI System on Chips, and SGX cores


SGX Core

SGX Core Revision

Max SGX Core Frequency (MHz)

















The SGX cores in AM family support OpenGL® ES 1.1 and OpenGL® ES 2.0 APIs.

For more information about the supported OpenGL® ES and EGL® extensions see:

The OpenGL® ES and EGL® libraries are packaged with the Processor SDK Linux and are used by graphics stacks such as Wayland/Weston. The drivers run on an ARM core and programs the firmware running inside a GPU core with rendering commands submitted by the user applications.

The rest of this page will cover the following topics:

  • Software architecture of Graphics

  • Instructions on how to run graphics demos

  • Instructions on how to run DSS application

  • Instructions on how launch Weston

  • Instructions on how to run PVR tools

  • SoC Performance Monitoring Tools

  • QT and GTK+ graphics frameworks

  • Migration Guide

  • AM3 Beagle Bone Black Board Configuration

  • SGX Debugging Tips

3.6.2. Software Architecture

The picture below shows the software architecture of Graphics in Processor SDK Linux.


Fig. 3.1 Graphics Software Stack

3.6.3. Graphics Demos

Along with the graphics driver and userspace libraries, the SDK also includes example applications. Some of the demos are based on the IMG Native_SDK examples.

The following 3D Graphics demos are available via Matrix. The table below provides a list of these demos, with a brief description.

Table 3.16 Demos via Matrix

Demo Name



This demo shows a matrix skinned character in combination with bump mapping.


This is a demonstration of a coverflow style effect


This demo shows how to efficiently render sprites and interface elements.


This is a demonstration of how to implement rendering algorithms for Navigation software.


This demo shows how to render and display multi-colored spinning cube

Running demos in Null Window system mode

The graphics demos can also be run in null-window system mode outside of Wayland windowing system as full screen applications. In order to do so, exit Weston by pressing Ctrl-Alt-Backspace from the keyboard which connects to the EVM. Then, if the LCD screen stays in “Please wait…”, press Ctrl-Alt-F1 to go to the command line on LCD console. After that, the command line can be used from serial console, SSH console, or LCD console.

Please make sure the board is connected to at least one display before running these demos.

# /usr/bin/SGX/demos/DRM/OGLES2Coverflow
# /usr/bin/SGX/demos/DRM/OGLES2ChameleonMan
# /usr/bin/SGX/demos/DRM/OGLES2ExampleUI
# /usr/bin/SGX/demos/DRM/OGLES2Navigation

After you see the output on the display interface, hit q to terminate the application.

Some of the demos under null windowing system require the user to pass in the drm connector id. For information on how to get connector id please refer to the Display section.

3.6.4. Display

TI SoC’s are equipped with Display SubSystem (DSS) hardware to provide hardware acceleration for alpha blending of overlays and color conversion. The DSS hardware is exposed to the software drm API available through libdrm module. Through this drm interface, a user space program can perform mode setting of the display.

The drm module models the display hardware as a series of abstract hardware blocks and manages them through the API. The blocks are:

  • CRTC1: represents a scanout engine that generates video timing signal from the data pointed to by the scanout buffer

  • Connector: represents where the video timing signal is sent across to the display

  • Encoder: transforms the video timing signal from CRTC to a format that is suitable for sending across the connector

  • Plane: represents the overlay buffer that a CRTC can be fed with

A utility application modetest can be used to get the list of available drm blocks. All the information available for the device can be displayed by using it. Finding Connector ID

Run the below modetest command:

# modetest -c

Look for the display device for which the connector ID is required - such as HDMI, LCD etc.

id      encoder status          type    size (mm)       modes   encoders
4       3       connected       HDMI-A  480x270         20      3
        name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
  1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 flags: phsync, pvsync; type: preferred, driver
16      15      connected       unknown 0x0             1       15
        name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
  800x480 60 800 1010 1040 1056 480 502 515 525 flags: nhsync, nvsync; type: preferred, driver

The modes displayed are the various resolutions supported by the connected display. Finding Plane ID

To find the Plane ID, run the modetest command:

# modetest -p

which should show something like below:

id      crtc    fb      CRTC x,y        x,y     gamma size
19      0       0       0,0             0,0     0
 formats: RG16 RX12 XR12 RA12 AR12 XR15 AR15 RG24 RX24 XR24 RA24 AR24 NV12 YUYV UYVY
20      0       0       0,0             0,0     0
 formats: RG16 RX12 XR12 RA12 AR12 XR15 AR15 RG24 RX24 XR24 RA24 AR24 NV12 YUYV UYVY


Run kmscube on the default display:

# kmscube

Run kmscube on the secondary display:

# kmscube -c <connector-id>

For example, if the connector id for the secondary display is 16:

# kmscube -c 16

Run kmscube on all connected displays (LCD & HDMI):

# kmscube -a

Running DSS Applications

DSS applications are omapdrm based. These will demonstrate the clone mode, extended mode, overlay window, z-order and alpha blending features. To demonstrate clone and extended mode, HDMI display must be connected to board. Application requires the supported mode information of connected displays and plane ids. One can get these information by running the modetest application in the filesystem.

#  modetest

Running drmclone application

This displays same test pattern on both LCD and HDMI (clone). Overlay window also displayed on LCD. To test clone mode, execute the following command:

# drmclone -l <lcd_w>x<lcd_h> -p <plane_w>x<plane_h>:<x>+<y> -h <hdmi_w>x<hdmi_h>

For example:

# drmclone -l 1280x800 -p 320x240:0+0 -h 640x480

We can change position of overlay window by changing x+y values. eg. 240+120 will show @ center

Running drmextended application

This displays different test pattern on LCD and HDMI. Overlay window also displayed on LCD. To test extended mode, execute the following command:

# drmextended -l <lcd_w>x<lcd_h> -p <plane_w>x<plane_h>:<x>+<y> -h <hdmi_w>x<hdmi_h>

For example:

# drmextended -l 1280x800 -p 320x240:0+0 -h 640x480

Running drmzalpha application


It determines, which overlay window appears on top of the other.

Range: 0 to 3
lowest value for bottom
highest value for top

Alpha Blend:

It determines transparency level of image as a result of both global alpha & pre multiplied alpha value.

Global alpha range: 0 to 255
0 - fully transparent
127 - semi transparent
255 - fully opaque

Pre multipled alpha value: 0 or 1
0 - source is not premultiply with alpha
1 - source is premultiply with alpha

To test drmzalpha, execute the following command:

# drmzalpha -s <crtc_w>x<crtc_h> -w <plane1_id>:<z_val>:<glo_alpha>:<pre_mul_alpha> -w <plane2_id>:<z_val>:<glo_alpha>:<pre_mul_alpha>

For example:

# drmzalpha -s 1280x800 -w 19:1:255:1 -w 20:2:255:1

3.6.5. Wayland/Weston

The supported Wayland/Weston version brings in the multiple display support in extended desktop mode and the ability to drag-and-drop windows from one display to the other. Starting Weston with Systemd

Starting with Weston 10, the preferred way to start Weston is with the weston user using the systemd service. If you need to interact with this instance using any other user then make sure that user is in the wayland or root group and direct them to interact with that instance using the global socket at /run/wayland-0.

This global socket is special in that it will automatically launch Weston when a GUI application attempts to connect to it. A profile script in /etc/profile.d will automatically set the WAYLAND_DISPLAY environment variable if the user has sufficient permission to interact with the socket.

To start the systemd service manually, do the following:

# systemctl start weston

To inspect the systemd service and socket status, do the following:

# systemctl status weston.service weston.socket Starting Weston Manually

To launch Weston manually, do the following:

On the target console:


On the default display:

# weston --tty=1 --display=<default connector-id>

On the secondary display:

# weston --tty=1 --display=<secondary connector-id>

On all connected displays (LCD and HDMI):

# weston --tty=1

By default, the screensaver timeout is configured to 300 seconds. The user can change the screensaver timeout using a command line option:

--idle-time=<number of seconds>

For example, to set timeout of 10 minutes and Weston configured to display on all connectors, use the below command:

weston --tty=1 --idle-time=600

To disable the screen timeout and to configure Weston to display on all connectors, use the below command:

weston --tty=1 --idle-time=0

If you face any issues with the above procedure, please refer to the upstream weston documentation for troubleshooting tips.

The filesystem comes with a preconfigured weston.ini file which will be located in

/etc/xdg/weston/weston.ini Running Weston clients

Weston client examples can run from the command line on a serial port console or an SSH console. After launching Weston, the user should be able to use the keyboard and the mouse for various controls.
# /usr/bin/weston-flower
# /usr/bin/weston-clickdot
# /usr/bin/weston-cliptest
# /usr/bin/weston-dnd
# /usr/bin/weston-editor
# /usr/bin/weston-eventdemo
# /usr/bin/weston-image /usr/share/weston/terminal.png
# /usr/bin/weston-resizor
# /usr/bin/weston-simple-egl
# /usr/bin/weston-simple-shm
# /usr/bin/weston-simple-touch
# /usr/bin/weston-smoke
# /usr/bin/weston-info
# /usr/bin/weston-terminal Running multimedia with Wayland sink

The GStreamer video sink for Wayland is the waylandsink. To use this video-sink for video playback:

# gst-launch-1.0 playbin uri=file://<path-to-file-name> video-sink=waylandsink Exiting Weston

Terminate all Weston clients before exiting Weston. If you have invoked Weston from the serial console, exit Weston by pressing Ctrl-C.

If Weston was started automatically by the init system then it can be stopped with:

# systemctl stop weston

It is also possible to invoke Weston from the native console, exit Weston by pressing Ctrl-Alt-Backspace. Using IVI shell feature

The SDK also has support for configuring Weston ivi-shell. The default shell that is configured in the SDK is the desktop-shell.

To change the shell to ivi-shell, the user will have to add the following lines into the /etc/xdg/weston/weston.ini.

To switch back to the desktop-shell can be done by commenting these lines in the /etc/xdg/weston/weston.ini (comments begin with a ‘#’ at the start of line).


After the above configuration is completed, we can restart Weston by running the following command

# systemctl restart weston


When Weston starts with ivi-shell, the default background is black, this is different from the desktop-shell that brings up a window with background.

With ivi-shell configured for Weston, Wayland client applications use ivi-application protocol to be managed by a central HMI window management.

Applications must support the ivi_application Wayland protocol to be managed by the HMI central controller with an unique numeric ID.

Some important references to Weston IVI-shell can be found at the following link: Running QT applications with IVI shell

To run the QT application with ivi-shell, set the QT_WAYLAND_SHELL_INTEGRATION environment variable to ivi-shell.


3.6.6. Using the PowerVR Tools

The suite of PowerVR Tools is designed to enable rapid graphics application development. It targets a range of areas including asset exporting and optimization, PC emulation, prototyping environments, on-line and off-line performance analysis tools and many more. Please refer to PowerVR-SDK for additional details on the tools and detailed documentation.

There are a number of useful tools available in the Imagination PowerVR SDK that are compatible with our devices. Two of the most useful tools available are PVRTune and PVRCarbon, which can be used for to profiling and tracing GFX activities.

Previously these were included in the target’s rootfs, but these were removed due to tight version dependencies between the target and host tools. Imagination has moved to packaging the target binaries with their host installer, so we recommend using those binaries directly for guaranteed compatibility. PVRTune

The PVRTune utility is a real-time GPU performance analysis tool. It captures hardware timing data and counters which facilitate the identification of performance bottlenecks. PVRPerfServer should be used along with the PVRTune running on the PC to gather data on the SGX loading and activity threads. The target binaries can be found in the host’s PVRTune installation directory under PVRPerfServer.

For more information please refer to Imagination’s upstream documentation on PVRTune and PVRPerfServer.

https://docs.imgtec.com/tools-manuals/pvrtune-manual/topics/introduction.html PVRCarbon

The PVRCarbon is an OpenGL® ES and Vulkan ® API recording and analysis utility. PVRCarbon GUI provides off-line tools to inspect captured data, identify redundant calls, highlight costly shaders and many more. This tool can capture traces on target and then play them back on multiple different devices by introducing shim libraries in place of the standard offering for that API.

This requires a little bit of setup on the target though. Please refer to Imagination’s upstream target setup guide for the most recent instructions.



CRTC stands for cathode-ray tube controller, a throw back to the old cathode-ray tubes TV’s which had a controller that generated video timings based on the data it is being fed by a buffer.