RZ-G/Panfrost for RZG2L: Difference between revisions
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
* SOC: RZ/G2L, RZ/V2L, RZ/G2LC<br> | * SOC: RZ/G2L, RZ/V2L, RZ/G2LC<br> | ||
* BOARD: RZ/G2L, RZ/G2LC and RZ/V2L based board<br> | * BOARD: RZ/G2L, RZ/G2LC and RZ/V2L based board<br> | ||
* Kernel: [https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-5.10.y-cip linux-5.10.y-cip | * Kernel: [https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-5.10.y-cip linux-5.10.y-cip], [https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-6.1.y-cip linux-6.1.y-cip] and [https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Linux mainline kernel]<br> | ||
* Software package: MESA 21.3.0(Worked), MESA 21.3.7(Worked)<br> | * Software package: MESA 21.3.0(Worked), MESA 21.3.7(Worked)<br> | ||
'''Note''': Please apply [HACK DO NOT APPLY] patches in the [https://patchwork.kernel.org/project/cip-dev/list/?series=809220 patch set] to enable display on 5.10.y-cip.<br> | |||
= Preparation = | = 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> | 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> | ::'''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 of '''RZ MPU Graphics Library'''.<br> | 2) Add [https://github.com/renesas-rz/meta-rz-panfrost meta-rz-panfrost layer] instead of '''RZ MPU Graphics Library'''.<br> | ||
''' | '''Note''': All test verified with [https://www.renesas.com/us/en/document/swo/rzg-verified-linux-package-v305-update1rtk0ef0045z0021azj-v305-update1zip?r=1597481 VLP 3.0.5update1].<br> | ||
<pre> | <pre> | ||
$ cd your_vlp_build_folder/ | $ cd your_vlp_build_folder/ |
Revision as of 08:48, 15 December 2023
← RZ-G
Introduction
Notice: 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.
- 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.
Requirements
- SOC: RZ/G2L, RZ/V2L, RZ/G2LC
- BOARD: RZ/G2L, RZ/G2LC and RZ/V2L based board
- Kernel: linux-5.10.y-cip, linux-6.1.y-cip and Linux mainline kernel
- Software package: MESA 21.3.0(Worked), MESA 21.3.7(Worked)
Note: Please apply [HACK DO NOT APPLY] patches in the patch set to enable display on 5.10.y-cip.
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 of RZ MPU Graphics Library.
Note: All test verified with VLP 3.0.5update1.
$ 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
PACKAGECONFIG_append_pn-mesa = " egl kmsro panfrost" IMAGE_INSTALL_append += " mesa weston kmscube glmark2"
4) Build your system
$ bitbake core-image-minimal
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.
# systemctl stop weston@root # kmscube
... if you want to test glmark2-es2-wayland above 720p, add cma=384M in bootargs.
Have Fun~~
Show Liu