3d2dAcceleration

From Linux Rockchip
Jump to: navigation, search

This page describes key components needed to get 3D (and 2D) acceleration under GNU/linux for Rockchip SoCs

Contents

Overview

Depending on architecture (currently supported rk3066 or rk3188, although being many others) there is currently support for both 3d and 2d acceleration (rk3066, using olegk0 xf86-driver-rk30fb) or only for 3d acceleration (rk3188, using linux-sunxi oriented xf86-driver-fbturbo)


Mali400 kernel drivers

Usually located (when present) under:

  • drivers/gpu/mali (being the mali kernel driver)
  • drivers/gpu/drm/mali or drivers/gpu/mali_drm/ (being the mali drm kernel driver)

If not present, they can be downloaded at http://malideveloper.arm.com/develop-for-mali/drivers/open-source-mali-gpus-linux-kernel-device-drivers/

Take in mind that it's not just copying the files to the correct paths. Adding the correct IOCTLS in kernel code is also needed.

Anyhow, take also in account that versions currently supported by sunxi-mali userspace libraries exclude r3p2-01rel0 (reported as r3p2) and r4p0-00rel0, so the best if to attach to r3p2-01rel1 or r3p2-01_rel2.

Userspace libraries

For the moment, binaries taken from sunxi-mali repository: https://github.com/linux-sunxi/sunxi-mali.git

Xorg driver

Applicable to rk3188: As recommended by linux-sunxi community, xf86-video-fbturbo is the current best choice: https://github.com/ssvb/xf86-video-fbturbo.git (version 0.4.0)

If using r3p2-*, the maintainer of the repo has recommended to use this branch: https://github.com/ssvb/xf86-video-fbturbo/tree/mali-r3p2-support

For 2D hardware acceleration (including XVideo), try this driver: https://github.com/lgeek/xf86-video-fbturbo. Note, this is experimental code and Mali support might not be working.

Applicable to rk3066: xf86-video-rk30fb by olegk0 is the recommended option for rk3066 SoCs: https://github.com/olegk0/xf86-video-fbdev


If you have managed to arrive to this point (remember to load corresponding kernel drivers before starting X, perhaps in /etc/modules), you should be able to successfully run es2gears and get between 200.000 fps and 400.000 fps

ToDo (not applicable to xf86-driver-rk30fb)

IPP support

Image Post Processing (IPP) is used doing image scaler, deinterlace and rotation. Each processing can be done independently or combined with others.

RGA support

RGA is a separate 2D raster graphic acceleration unit. It accelerates 2D graphics operations, such as point/line drawing, image scaling, rotation, BitBLT, alpha blending and image blur/sharpness.

RGA is used by the RK3188 fbturbo fork(https://github.com/lgeek/xf86-video-fbturbo) to accelerate framebuffer-to-framebuffer BitBLTs.

Advanced LCDC support

The LCD controller used in RK3188 supports advanced features such as multiple overlays and a hardware cursor. These features are used in the experimental RK3188 fbturbo fork(https://github.com/lgeek/xf86-video-fbturbo) to accelerate XV.

See also