How to use open source Panfrost GPU Driver on RZ/G2Lx: Difference between revisions
(Created page with "== 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. === == In...") Â |
No edit summary |
||
Line 7: | Line 7: | ||
=== Requirement === | === Requirement === | ||
SOC: RZ/G2L, RZ/V2L, RZ/G2LC | SOC: RZ/G2L, RZ/V2L, RZ/G2LC<br> | ||
BOARD: RZ/G2L SMARC board | BOARD: RZ/G2L SMARC board<br> | ||
Kernel: Linux kernel [https://github.com/renesas-rz/rz_linux-cip/tree/rz-5.10-cip1 v5.10+](v5.16/mainline is also OK but some more patches is needed, let's focus on v5.10 in this article.) | Kernel: Linux kernel [https://github.com/renesas-rz/rz_linux-cip/tree/rz-5.10-cip1 v5.10+](v5.16/mainline is also OK but some more patches is needed, let's focus on v5.10 in this article.)<br> | ||
Software package: MESA 21.3.x(v21.3.0 and v21.3.7 is tested and worked) | Software package: MESA 21.3.x(v21.3.0 and v21.3.7 is tested and worked)<br> | ||
=== Device tree === | === Device tree === | ||
Line 44: | Line 44: | ||
=== Setup the yocto to re-build the runtime environment === | === Setup the yocto to re-build the runtime environment === | ||
In order to not conflict the official Mali driver, please make sure the following package is not integrated | In order to not conflict with the official Mali driver, please make sure the following package is not integrated into your yocto build folder.<b | ||
r> | r> | ||
[https://www.renesas.com/tw/en/document/swe/rz-mpu-graphics-library-evaluation-version-v081-board-support-package-rzg2l-and-rzg2lc?language=en&r=1467981 RZ MPU Graphics Library Evaluation Version V0.81 for Board Support Package of RZ/G2L and RZ/G2LC] | [https://www.renesas.com/tw/en/document/swe/rz-mpu-graphics-library-evaluation-version-v081-board-support-package-rzg2l-and-rzg2lc?language=en&r=1467981 RZ MPU Graphics Library Evaluation Version V0.81 for Board Support Package of RZ/G2L and RZ/G2LC] |
Revision as of 09:19, 11 April 2022
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 SMARC board
Kernel: Linux kernel v5.10+(v5.16/mainline is also OK but some more patches is needed, let's focus on v5.10 in this article.)
Software package: MESA 21.3.x(v21.3.0 and v21.3.7 is tested and worked)
Device tree
In kernel-source/arch/arm64/boot/dts/renesas/r9a07g044.dtsi, please add the below GPU node in the RZ/G2L device tree.
gpu: gpu@11840000 { compatible = "renesas,r9a07g044-mali", "arm,mali-bifrost"; reg = <0x0 0x11840000 0x0 0x10000>; interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "job", "mmu", "gpu", "event"; clocks = <&cpg CPG_MOD R9A07G044_GPU_CLK>, <&cpg CPG_MOD R9A07G044_GPU_AXI_CLK>, <&cpg CPG_MOD R9A07G044_GPU_ACE_CLK>; clock-names = "gpu", "bus", "bus_ace"; power-domains = <&cpg>; resets = <&cpg R9A07G044_GPU_RESETN>, <&cpg R9A07G044_GPU_AXI_RESETN>, <&cpg R9A07G044_GPU_ACE_RESETN>; reset-names = "rst", "axi_rst", "ace_rst"; operating-points-v2 = <&gpu_opp_table>; };
Kernel configuration
To enable the Panfrost kernel driver support, please make sure the kernel config is included in kernel configuration below.
CONFIG_DRM_PANFROST=y
Setup the yocto to re-build the runtime environment
In order to not conflict with the official Mali driver, please make sure the following package is not integrated into your yocto build folder. RZ MPU Graphics Library Evaluation Version V0.81 for Board Support Package of RZ/G2L and RZ/G2LC
Add some more configuration in your local.conf
In build/conf/local.conf, Please add the following config for your build config.
PACKAGECONFIG_append_pn-mesa = " egl kmsro panfrost" IMAGE_INSTALL_append += " mesa weston kmscube glmark2"