The Graphics Processing Unit (GPU) is a graphics accelerator targeting embedded 2D/3D graphics applications.

The GPU drivers provide the following software and hardware support:

  • EGL 1.4 API defined by Khronos Group. (EGL is an interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system.)

  • OpenGL ES 1.1 API defined by Khronos Group. (OpenGLĀ® ES is a royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems.)

  • OpenGL ES 2.0 API defined by Khronos Group.

  • OpenGL ES 3.0 API defined by Khronos Group.

  • OpenVG 1.1 API defined by Khronos Group. (OpenVG is a royalty-free, cross-platform API that provides a low-level hardware acceleration interface for vector graphics libraries such as Flash and SVG.)

  • OpenCL 1.1 EP API defined by Khronos Group. (OpenCL is the first open, royalty-free standard for cross-platform, parallel programming of modern processors.)

  • OpenGL 2.1 API defined by Khronos Group.

  • Automatic 3D core slowing upon reception of thermal driver hot notification.

Kernel configuration

You can manage the GPU driver support through the kernel configuration option:

  • MXC Vivante GPU support (CONFIG_MXC_GPU_VIV)

This option is enabled as built-in on the ConnectCore 6 SBC kernel configuration file.

Kernel driver

The GPU drivers for the i.MX6 are located at drivers/mxc/gpu-viv:

File Description

hal/kernel/arch

Hardware-specific driver code for GC2000, GC880, GC400T, and GC320

hal/kernel/archvg

Hardware-specific driver code for GC355

hal/kernel

Kernel mode HAL driver

hal/os/linux/kernel

OS layer HAL driver

Contiguous memory allocation for the GPU

The driver manages the contiguous memory allocation (CMA) without using the kernel CMA support. The default memory allocation by the GPU is 128MiB. If more or less memory is required, you can specify the memory allocation size through the kernel parameters by appending galcore.contiguousSize=<bytes> to the kernel command line. In U-Boot, you can append any string to the kernel command line using the extra_bootargs variable. For example, to set the memory allocation size to 256MiB, run this command from the U-Boot console:

=> setenv extra_bootargs galcore.contiguousSize=268435456

Device tree bindings and customization

The i.MX6 GPU device tree binding is documented at Documentation/devicetree/bindings/gpu/fsl,gpu-viv.txt.

The GPU is defined in the i.MX6 CPU device tree file.

Definition of the GPU interface

Common i.MX6Q device tree
gpu: gpu@00130000 {
    compatible = "fsl,imx6q-gpu";
    reg = <0x00130000 0x4000>, <0x00134000 0x4000>,
          <0x02204000 0x4000>, <0x0 0x0>,
          <0x0 0x8000000>;
    reg-names = "iobase_3d", "iobase_2d",
            "iobase_vg", "phys_baseaddr",
            "contiguous_mem";
    interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>,
             <0 10 IRQ_TYPE_LEVEL_HIGH>,
             <0 11 IRQ_TYPE_LEVEL_HIGH>;
    interrupt-names = "irq_3d", "irq_2d", "irq_vg";
    clocks = <&clks IMX6QDL_CLK_GPU2D_AXI>, <&clks IMX6QDL_CLK_OPENVG_AXI>,
         <&clks IMX6QDL_CLK_GPU3D_AXI>, <&clks IMX6QDL_CLK_GPU2D_CORE>,
         <&clks IMX6QDL_CLK_GPU3D_CORE>, <&clks IMX6QDL_CLK_GPU3D_SHADER>;
    clock-names = "gpu2d_axi_clk", "openvg_axi_clk",
              "gpu3d_axi_clk", "gpu2d_clk",
              "gpu3d_clk", "gpu3d_shader_clk";
    resets = <&src 0>, <&src 3>, <&src 3>;
    reset-names = "gpu3d", "gpu2d", "gpuvg";
    power-domains = <&gpc 1>;
};
Common i.MX6DL device tree
gpu: gpu@00130000 {
    compatible = "fsl,imx6dl-gpu", "fsl,imx6q-gpu";
    reg = <0x00130000 0x4000>, <0x00134000 0x4000>,
          <0x0 0x0>, <0x0 0x8000000>;
    reg-names = "iobase_3d", "iobase_2d",
            "phys_baseaddr", "contiguous_mem";
    interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>,
             <0 10 IRQ_TYPE_LEVEL_HIGH>;
    interrupt-names = "irq_3d", "irq_2d";
    clocks = <&clks IMX6QDL_CLK_OPENVG_AXI>, <&clks IMX6QDL_CLK_GPU3D_AXI>,
         <&clks IMX6QDL_CLK_GPU2D_CORE>, <&clks IMX6QDL_CLK_GPU3D_CORE>,
         <&clks IMX6QDL_CLK_DUMMY>;
    clock-names = "gpu2d_axi_clk", "gpu3d_axi_clk",
              "gpu2d_clk", "gpu3d_clk",
              "gpu3d_shader_clk";
    resets = <&src 0>, <&src 3>;
    reset-names = "gpu3d", "gpu2d";
    power-domains = <&gpc 1>;
};

The GPU interface is enabled by default.

IOMUX configuration

The GPU is a CPU internal subsystem. No IOMUX configuration is necessary.