Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

      The Broadcom VideoCore 4 (present in the Raspberry Pi) contains a OpenGL ES 2.0-compatible 3D engine called V3D, and a highly configurable display output pipeline that supports HDMI, DSI, DPI, and Composite TV output. The 3D engine also has an interface for submitting arbitrary compute shader-style jobs using the same shader processor as is used for vertex and fragment shaders in GLES 2.0. Closed source graphics stack runs on VC4 GPU and talks to V3D and display component. Vc4 uses mesa instead of userland for graphics. Mesa is an open source software implementation of OpenGl, Vulkan and other graphics API specification. Mesa translates these specifications to vendor specific graphics hardware drivers.

 RPI Structure 

Current RDK CMF

...

  Current RPI structure uses userland to send OpenGL commands to GPU/VPU through VCHIQ.  One of the major drawback of current approach is OpenMax IL for 64 bit is not officially supported. VCHIQ also needs changes for supporting 64 bit architecture.

       

      

 New  Structure

 An alternative for userland and dispmanx is vc4graphics and v4l2. Vc4 uses mesa instead of userland for graphics and video. Mesa implements a translation layer between a graphics API such as OpenGL and the graphics hardware drivers in the operating system kernel. The supported version of the different graphic APIs depends on the driver, because each hardware driver has its own implementation.


Efforts Involved to enable vc4graphics

 In order to enable vc4graphics in RPI, below changes are made in configuration.

      Userland uses dispmanx for rendering graphics and video. With vc4graphics instead of dispmanx, DRM is used for rendering.

      OpenGL (Open graphics Library), API for interacting with GPU ( graphical Processing Unit) is enabled with vc4.

     Westeros sink is enabled to use v4l2. 

     Gstreamer packages are enabled with GLES2 and EGL libraries.

List of changes done

 System Work Flow

           Direct Rendering Infrastructure (DRI) provide interface to interface Mesa, OpenGL and other 3D rendering API libraries with the device drivers and hardware. Mesa also contains an implementation of software rendering called swrast that allows shaders to run on the CPU as a fallback when no graphics hardware accelerators are present. The Gallium software rasterizer is known as softpipe or when built with support for LLVM llvmpipe, which generates CPU code at runtime


     Image Added

Environment Setup  

The build procedure is as follows:

...

The SD card is then inserted to the Raspberry Pi board and booted to check for containers created. The Raspberry Pi board is connected to the PC via a USB to serial converter and the logs can be checked in console or can be connected via HDMI cable to a TV and logs will be shown in the terminal

  • System Work Flow

           Direct Rendering Infrastructure (DRI) provide interface to interface Mesa, OpenGL and other 3D rendering API libraries with the device drivers and hardware. Mesa also contains an implementation of software rendering called swrast that allows shaders to run on the CPU as a fallback when no graphics hardware accelerators are present. The Gallium software rasterizer is known as softpipe or when built with support for LLVM llvmpipe, which generates CPU code at runtime

...

References

...