[PW_SID:992127] drm/etnaviv: add support for GC620 on T-Head TH1520 - #786
[PW_SID:992127] drm/etnaviv: add support for GC620 on T-Head TH1520#786linux-riscv-bot wants to merge 7 commits into
Conversation
This is the 2D GPU found on the T-Head TH1520 SoC. Feature bits taken from the downstream kernel driver 6.4.6.9.354872. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
In the GC620 on T-Head TH1520 SoC, the SECURITY feature flag isn't set but the SECURITY_AHB feature flag is set. In this situation, the VIVS_MMUv2_AHB_CONTROL register isn't available, but the GPU otherwise behave like secure ones and require commands to load PTA. The 6.4.6.9.354872 driver from T-Head asserts SECURITY_AHB feature flag is set when SECURITY one is set, so it could be assumed that the situation that only SECURITY is set do not exist. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The GC620 r5552 GPU found on T-Head TH1520 features (and requires) a DEC400EX buffer compressor that needs to be set up. In addition, some quirk exist for the DEC400 part that needs to be handled during GPU reset, otherwise the reset will not happen. Set the DEC400EX up and add the quirk code to the GPU reset codepath. Currently the DEC400EX setup is gated by this specific GPU identity, however in future we should add a feature flag for it. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
As we are forced to use a global shared context on some PTA-equipped-but-broken GPUs, the fine-grained mutex locking in the current implemtnation of etnaviv_iommuv2_context_alloc() won't be meaningful any more. Make the whole function to be protected by the global lock, in order to prevent reentrance when allocating global shared context. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
As we have some unfortunate GPUs with IOMMUv2 but broken PTA (reloading a different page table at runtime always fails), shared_context is now not a v1-only thing. Move it out of the v1 struct in the union. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Unfortunately the GC620 GPU seems to have broken PTA capibility, and switching page table ID in command stream after it's running won't work. As directly switching mtlb isn't working either, there will be no reliable way to switch page table in the command stream, and a shared context, like iommuv1, is needed. Add support for this shared context situation. Shared context is set when the broken PTA is known, and the context allocation code will be made short circuit when a shared context is set. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The T-Head TH1520 SoC contains a GC620 2D graphics accelerator. Enable it in the devicetree to allow using etnaviv driver with it. This patch is currently very dirty because it relies on the bootloader leaving the clocks enabled, and the core clock is a fake one. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 1: "[1/7] drm/etnaviv: add HWDB entry for GC620 r5552 c20b" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 2: "[2/7] drm/etnaviv: add handle for GPUs with only SECURITY_AHB flag" |
|
Patch 5: "[5/7] drm/etnaviv: prepare for shared_context support for iommuv2" |
|
Patch 5: "[5/7] drm/etnaviv: prepare for shared_context support for iommuv2" |
|
Patch 5: "[5/7] drm/etnaviv: prepare for shared_context support for iommuv2" |
|
Patch 5: "[5/7] drm/etnaviv: prepare for shared_context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 6: "[6/7] drm/etnaviv: add shared context support for iommuv2" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
|
Patch 7: "[7/7,NOT,FOR,UPSTREAM] riscv: dts: thead: enable GC620 G2D on TH1520" |
PR for series 992127 applied to workflow__riscv__fixes
Name: drm/etnaviv: add support for GC620 on T-Head TH1520
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=992127
Version: 1