Configure the Screen Graphics Subsystem

The default buildfile (am62x-evm.build) that's provided with this BSP doesn't build an image that starts the Screen Graphics Subsystem (Screen). Instead, you must use the image that's built from the am62x-evm-graphics.build file, which starts Screen automatically.

The Screen Graphics Subsystem (Screen) includes the libraries, services and tools required to run graphics applications on the board with supported graphics processors, and to manage graphics shown on the display. To use Screen, you often must configure the graphics and display. To confirm whether Screen is running properly on your target, we provide demo applications with this BSP that you can run on the target. This chapter provides an overview of how to use Screen on your target, but for detailed information, you should refer to the Screen Graphics Subsystem Developer's Guide in the QNX Software Development Platform 8.0 documentation.

Note:
To get the correct binaries and graphics configuration file for this board, you must install the Screen Board Support package for this board from the QNX Software Center. For information about how to determine the Screen Board Support package to install for this board, see the Screen release notes. After you install the Screen Board Support package, the $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/ directory will contain the drivers and graphics configuration you require. It's important to note that these binaries are necessary for you to build this BSP with graphics.

Graphics configuration

The specifics of a board’s graphics configuration, such as the target's output display port or the output resolution, are defined in the graphics configuration file (graphics.conf file). The graphics configuration file and required Screen binaries are found in the $QNX_TARGET/arch64le/usr/lib/graphics/am62x directory on your host installation. On the target, the same binaries and configuration are typically located at /usr/lib/graphics/am62x/. Before you start Screen, you must ensure that the LD_LIBRARY_PATH environment variable includes the path to the Screen binaries. In the example buildfile, this has been done for you, but if you haven't done this, here what you can do before starting Screen:

# export LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/lib/dll/pci:\
                         /usr/lib/graphics/am62x
# screen -c /usr/lib/graphics/am62x/graphics.conf
The supported resolutions per display can be found in this file. Screen needs to be restarted for any change in graphics configuration to take effect as follows:
# slay screen
# screen -c /usr/lib/graphics/am62x/graphics.conf

For more information about the Screen Graphics Subsystem, see the Screen Graphics Subsystem Developer’s Guide in the QNX Software Development Platform 8.0 documentation.

Configure the display for Screen

For the graphics.conf file, the video-mode setting must match the screen resolution and frame rate supported by the display that's connected to your board. Screen reads these parameters from the graphics.conf file to initialize the display drivers. This is the suggested resolution and frame rate for HDMI display that can be found in the graphics.conf file:
  • 1920x1080 @ 60 (default for HDMI output)
For example, for a 1920 x 1080 @ 60 Hz display, set the video-mode in the graphics.conf file as shown here:
...
...
...
  begin display 1
    formats = rgba8888, rgbx8888, rgb565, rgba5551, yuy2, uyvy, nv12
    video-mode = 1920 x 1080 @ 60
    cursor = off
  end display
...
...
For more information about configuring the display subsection in the graphics.conf, see Configure display subsection in the Screen Graphics Subsystem Developer's Guide.

Display driver

The video display configuration library is located on the target at /usr/lib/graphics/am62x/libwfdcfg-am62x-evm.so and /usr/lib/graphics/am62x/libWFDam62x.so.

Using the GPU

This board requires the following files to run applications that utilize the GPU, which are listed in the $BSP_ROOT_DIR/images/am62x-evm-graphics.build file in this BSP:
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libglslcompiler.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libIMGegl.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libIMGGLESv2.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libPVROCL.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libPVRScopeServices.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libpvrSCREEN_WSEGL.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libsrv_km.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libsrv_um.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libufwriter.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libVK_IMG.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libWFDam62x.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/libwfdcfg-am62x-evm.so
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/rgx_vulkan_icd.json
  • $QNX_TARGET/aarch64le/usr/lib/graphics/am62x/screen-jacinto7-alloc.so

Run Screen applications

This BSP archive comes with built-in demo applications that show how to use Screen. It's a good idea to run these demos on your target to confirm that Screen is configured properly and all the necessary drivers are available for Screen to run. If the following demo applications run successfully, it's a good indication that Screen is properly configured on your target.

sw-vsync
Shows vsync that uses software rendering, but doesn't use GLES. This application is useful to verify that your display works with basic Screen functionality.
Figure 1sw-vsync


gles2-gears
Shows gears that use OpenGL ES 2.X for the rendering API; if gles2-gears runs, then it confirms that screen and drivers necessary for OpenGL ES 2.x have started successfully.
Figure 2gles2-gears


For more information about using the demo applications or debugging them, see the Utilities and Binaries and the Debugging chapters in the Screen Developer's Guide, respectively.

Create Screen applications

When you create an application that supports Screen, it must link to the Screen library (libscreen.so). This library provides the interfaces for applications to use the Screen API. Depending on the graphical requirements of your application, you may need to link in additional libraries. Below are some of the libraries commonly used when building applications that use Screen:
libEGL
The interface to access vendor-specific EGL functionality. Refer to the EGL standard from www.khronos.org.
libGLESv2
The interface to access vendor-specific OpenGL ES functionality. Refer to the OpenGL ES standard from www.khronos.org.
libimg
The interface to load and decode images. For more information, see the Image Library Reference guide in the QNX Software Development Platform 8.0 documentation.

For more information about application development using Screen, see the Screen Graphics Subsystem Developer’s Guide. For information about linking libraries, see QNX C/C++ Project properties in the Reference chapter of the QNX Momentics IDE User's Guide or the Compiling and Debugging chapter of the QNX OS Programmer's Guide.

Page updated: