RZ-G/Panfrost for RZG2L: Difference between revisions
(Created page with "{{DISPLAYTITLE: How to use open source Panfrost GPU Driver on RZ/G2Lx }} ← RZ-G == Note: This article is for experienced users only. == === The Panforst driver is not...") |
No edit summary |
||
Line 11: | Line 11: | ||
=== Requirement === | === Requirement === | ||
SOC: RZ/G2L, RZ/V2L, RZ/G2LC<br> | SOC: RZ/G2L, RZ/V2L, RZ/G2LC<br> | ||
BOARD: RZ/G2L | BOARD: RZ/G2L,RZ/V2L based board<br> | ||
Kernel: Linux kernel | Kernel: Linux kernel v5.10+<br> | ||
Software package: MESA 21.3.x | Software package: MESA 21.3.x+<br> | ||
=== | === Preparation === | ||
1) Please Download and extract the [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzg-linux-platform/rzg-marketplace/verified-linux-package/rzg-verified-linux-package RZ/G2L VLP] or [https://www.renesas.com/us/en/software-tool/rzv-verified-linux-package RZ/V2L VLP] into you build folder<br> | |||
::'''Note: you do not need RZ MPU Graphics Library support package, please do not apply it on your build environment.'''<br> | |||
2) Add [https://github.com/renesas-rz/meta-rz-panfrost meta-rz-panfrost layer] instead '''RZ MPU Graphics Library'''. | |||
<pre> | <pre> | ||
$ cd your_vlp_build_folder/ | |||
$ git clone https://github.com/renesas-rz/meta-rz-panfrost meta-rz-panfrost | |||
$ vim conf/bblayer.conf // Add meta-rz-panfrost layer into your bblayer.conf | |||
</pre> | </pre> | ||
3) Enable kmscube and glmark2 in local.conf | |||
<pre> | <pre> | ||
IMAGE_INSTALL_append += " kmscube glmark2" | |||
IMAGE_INSTALL_append += " | |||
</pre> | </pre> | ||
4) Build your system | |||
<pre> | <pre> | ||
$ bitbake core-image-weston | $ bitbake core-image-weston | ||
Line 99: | Line 65: | ||
* kmscube is also available but stop the weston is needed before run it. | * kmscube is also available but stop the weston is needed before run it. | ||
... | ... | ||
'''if you want to test glmark2-es2-wayland above 720p, add cma=384M in bootargs.''' | |||
---- | ---- | ||
Have Fun~~<br> | Have Fun~~<br> | ||
[mailto:show.liu.yj@renesas.com Show Liu] | [mailto:show.liu.yj@renesas.com Show Liu] |
Revision as of 17:44, 28 April 2023
← RZ-G
Note: This article is for experienced users only.
The Panforst driver is not part of official BSP, So some hacking/modification on BSP package is needed.
Introduction
The Panfrost driver stack is open source GPU driver for Midgard and Bifrost microarchitectures based Mali GPU. The RZ/G2Lx series included Mali G31 GPU inside is on the Panfrost support list as well.
This article is a tutorial to enable Panfrost driver support for RZ/G2Lx series Mali GPU based MPU.
Requirement
SOC: RZ/G2L, RZ/V2L, RZ/G2LC
BOARD: RZ/G2L,RZ/V2L based board
Kernel: Linux kernel v5.10+
Software package: MESA 21.3.x+
Preparation
1) Please Download and extract the RZ/G2L VLP or RZ/V2L VLP into you build folder
- Note: you do not need RZ MPU Graphics Library support package, please do not apply it on your build environment.
- Note: you do not need RZ MPU Graphics Library support package, please do not apply it on your build environment.
2) Add meta-rz-panfrost layer instead RZ MPU Graphics Library.
$ cd your_vlp_build_folder/ $ git clone https://github.com/renesas-rz/meta-rz-panfrost meta-rz-panfrost $ vim conf/bblayer.conf // Add meta-rz-panfrost layer into your bblayer.conf
3) Enable kmscube and glmark2 in local.conf
IMAGE_INSTALL_append += " kmscube glmark2"
4) Build your system
$ bitbake core-image-weston
Test the Panfrost driver with glmark2
- Make sure the Panfrost kernel driver is ready
Kernel boot up log:
... [ 0.140409] panfrost 11840000.gpu: clock rate = 500000000 [ 0.140456] panfrost 11840000.gpu: bus_clock rate = 200000000 [ 0.141269] panfrost 11840000.gpu: [drm:panfrost_devfreq_init] Failed to register cooling device [ 0.141371] panfrost 11840000.gpu: mali-g31 id 0x7093 major 0x0 minor 0x0 status 0x0 [ 0.141390] panfrost 11840000.gpu: features: 00000000,3fde77ff, issues: 00000000,00000400 [ 0.141408] panfrost 11840000.gpu: Features: L2:0x070d0206 Shader:0x00000000 Tiler:0x00000209 Mem:0x1 MMU:0x00002821 AS:0xff JS:0x7 [ 0.141425] panfrost 11840000.gpu: shader_present=0x1 l2_present=0x1 [ 0.142475] [drm] Initialized panfrost 1.1.0 20180908 for 11840000.gpu on minor 0 ...
- add PAN_MESA_DEBUG="noafbc" in /etc/environment for your RZ/G2Lx runtime or export PAN_MESA_DEBUG="noafbc" before your run the glmark2-es2-wayland.(kernel v5.10 MUST required.)
Run glmark2-es2-wayland, you should see the Panfrost information like below and the glmark2 testing screen in the monitor.
root@smarc-rzg2l:~# glmark2-es2-wayland ======================================================= glm[10215.517141] panfrost 11840000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x63c8140, tail=0x63c8140 ark2 2017.07 ==[10215.528535] panfrost 11840000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0x63c8140, tail=0x63c8140, sched_job=0000000035c763e7 ===================================================== OpenGL Information GL_VENDOR: Panfrost GL_RENDERER: Mali-G31 (Panfrost) GL_VERSION: OpenGL ES 3.1 Mesa 21.3.7 =======================================================
- kmscube is also available but stop the weston is needed before run it.
... if you want to test glmark2-es2-wayland above 720p, add cma=384M in bootargs.
Have Fun~~
Show Liu