How to Use TI Graphics SDK on the AM335x

The following guide describes the method for building TI Graphics SDK for the AM335x Platforms.

The Graphics SDK provides OGLES v1 and v2 libraries, the SGX/PVR graphics accelerator kernel loadable module and the SGX/PVR X11 user-space driver.


Release 3.12-am335x-ts1 (without X)

  • Based on TI Graphics SDK for AM335x version 5_01_01_01
  • Desktop Factory configured for the am335x_evm, am335x_sk or beaglebone_black

Release 3.2-am335x-ts3 (with X)

  • Based on TI Graphics SDK for AM335x version 4_09_00_01
  • Desktop Factory configured for the am335x_evm or am335x_sk (beaglebone_black not supported)
  • GCC 4.8.3 (OpenGL demo apps failed with 4.8.2)

Previous Tested Releases

  • Linux 3.2-am335x-ts3 with ti-graphics-sdk_4_09_00_01, both with and without X on SK and EVM

Compatibility Note

TI has dropped support for X in the latest SDK (5_01_01_01). According to (Mar 2014) TI has no plan to support X with the current Graphics SDKs.

4_09_00_01 Windowing Support:
5_01_01_01 Windowing Support:

Also, the old SDK (4_09_00_01) was found to be incompatible with that the later kernels (3.12-am335x-ts1 for all boards and 3.8 for BBB) due to changes in the DRM driver (drivers/gpu/drm). Support for X therefore requires using both the old 3.2 kernel and the old SDK. Since the earliest kernel we support for the BBB is 3.8, X with the TI Graphics SDK is not supported on that board.


The DVSDK is enabled with "make menuconfig" and the following selections:

Target Software  --->
  Software Packages  --->
    Graphics  --->
      Toolkit  --->
        [*] ti-graphics-sdk-5_01_01_01  --->


After bootup, use lsmod to verify that the pvrsrvkm module has been loaded

Running the sample applications

Low Level SGX Test

Run the following test programs to verify SGX funcationality:
  • sgx_init_test
  • sgx_clipblit_test

OGLESv1 Demo Applications

Run the following demo applications from the directory /usr/gfxsdkdemos/ogles:
  • OGLESEvilSkull

Enter q to exit each demo.

OGLESv2 Demo Applications

Run the following demo applications from the directory /usr/gfxsdkdemos/ogles2:
  • OGLES2ChameleonMan
  • OGLES2MagicLantern

Enter q to exit each demo

With X11 (EVM and SK only)

To build factory with X11:

Target Software  --->
  Software Packages  --->
    Graphics  --->
      X11 --->
        [*] xf86-input-evdev  --->
        [*] xserver-xorg  --->

If the Graphics SDK was previously built without X11 and X11 is then added, it is necessary to rebuild the Graphics SDK:

make ti-graphics-sdk-clean

This is because there is a different version of which needs to be placed on the target when using X11/DRI/DRM.

The same OGLES and OGLES2 applications listed above can be run over X11 after setting the display:

export DISPLAY=:0

X11 can also be tested using xfce applications if they are added to the Factory.

Caution: if you are using xf86-input-evdev, xf86-input-mouse or xf86-input-keyboard you may have to adjust the input devices listed in the /usr/share/X11/xorg.conf.d/99-timesys.conf configuration file to match your kernel configuration. It assumes:
- input 0: accelerometer
- input 1: touchscreen
- input 3: USB keyboard (if inserted)
This will change if, for example, your kernel is compiled without accelerometer support. To check, look at the input messages in the boot log.


When using X11, the demo applications fail with error "PVRShell: Unable to create surface"

When running the demo applications in X11 mode, you may see the following error:

PVRShell: EGL 1.4 initialized
WSEGL_CreateWindowDrawable: WSEGLDRI2GetWindowInfo failed
Exit message has been set to: "PVRShell: Unable to create surface".
InitAPI failed!
PVRShell: Unable to create surface

This is typically caused by the system running out of memory for the GPU Pixmap pool. It's especially prevalent when running the demos with another X application, such as a Desktop environment, running.

You can increase the size of the pool in your Xorg.conf file. Try setting the following option in the "Devices" section:

Option          "PixmapPoolSizeMB"      "100"