[PW_SID:976146] [v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management#577
[PW_SID:976146] [v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management#577linux-riscv-bot wants to merge 6 commits into
Conversation
Update the Imagination PVR DRM driver to leverage the pwrseq framework
for managing the complex power sequence of the GPU on the T-HEAD TH1520
SoC.
To cleanly separate platform specific logic from the generic driver,
this patch introduces a `pwr_power_sequence_ops` struct containing
function pointers for power_on and power_off operations. This allows for
different power management strategies to be selected at probe time based
on the device's compatible string.
A `pvr_device_data` struct, associated with each compatible in the
of_device_id table, points to the appropriate ops table (manual or
pwrseq).
At probe time, the driver inspects the assigned ops struct. If the
pwrseq variant is detected, the driver calls
devm_pwrseq_get("gpu-power"), deferring probe if the sequencer is not
yet available. Otherwise, it falls back to the existing manual clock and
reset handling. The runtime PM callbacks now call the appropriate
functions via the ops table.
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Update the img,powervr-rogue.yaml to include the T-HEAD TH1520 SoC's specific GPU compatible string. The thead,th1520-gpu compatible, along with its full chain img,img-bxm-4-64, and img,img-rogue, is added to the list of recognized GPU types. While the BXM-4-64 GPU IP is designed with two distinct power domains, the TH1520 SoC integrates it with only a single, unified power gate that is controllable by the kernel. To model this reality correctly while keeping the binding accurate for other devices, add conditional constraints to the `allOf` section: - If the compatible is "thead,th1520-gpu", enforce a maximum of one power domain. - For other "img,img-bxm-4-64" and "img,img-bxs-4-64" devices, enforce a minimum of two power domains, using a 'not:' clause to exclude the TH1520. This makes the binding strict and correct for both the specific TH1520 implementation and for other SoCs that use the B-series Rogue GPUs. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the "gpu-clkgen" reset property to the AON device tree node. This allows the AON power domain driver to detect the capability to power sequence the GPU and spawn the necessary pwrseq-thead-gpu auxiliary driver for managing the GPU's complex power sequence. This commit also adds the prerequisite dt-bindings/reset/thead,th1520-reset.h include to make the TH1520_RESET_ID_GPU_CLKGEN available. This include was previously dropped during a conflict resolution [1]. Link: https://lore.kernel.org/all/aAvfn2mq0Ksi8DF2@x1/ [1] Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Drew Fustini <drew@pdp7.com> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add a device tree node for the IMG BXM-4-64 GPU present in the T-HEAD TH1520 SoC used by the Lichee Pi 4A board. This node enables support for the GPU using the drm/imagination driver. By adding this node, the kernel can recognize and initialize the GPU, providing graphics acceleration capabilities on the Lichee Pi 4A and other boards based on the TH1520 SoC. Add fixed clock gpu_mem_clk, as the MEM clock on the T-HEAD SoC can't be controlled programatically. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Drew Fustini <drew@pdp7.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Several RISC-V boards feature Imagination GPUs that are compatible with the PowerVR driver. An example is the IMG BXM-4-64 GPU on the Lichee Pi 4A board. This commit adjusts the driver's Kconfig dependencies to allow the PowerVR driver to be compiled on the RISC-V architecture. By enabling compilation on RISC-V, we expand support for these GPUs, providing graphics acceleration capabilities and enhancing hardware compatibility on RISC-V platforms. The RISC-V support is restricted to 64-bit systems (RISCV && 64BIT) as the driver currently has an implicit dependency on a 64-bit platform. Add a dependency on MMU to fix a build warning on RISC-V configurations without an MMU. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 1: "[v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 2: "[v7,2/5] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU compatible" |
|
Patch 3: "[v7,3/5] riscv: dts: thead: th1520: Add GPU clkgen reset to AON node" |
|
Patch 3: "[v7,3/5] riscv: dts: thead: th1520: Add GPU clkgen reset to AON node" |
|
Patch 3: "[v7,3/5] riscv: dts: thead: th1520: Add GPU clkgen reset to AON node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 4: "[v7,4/5] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
|
Patch 5: "[v7,5/5] drm/imagination: Enable PowerVR driver for RISC-V" |
b5ded79 to
a7cb30d
Compare
PR for series 976146 applied to workflow__riscv__fixes
Name: [v7,1/5] drm/imagination: Use pwrseq for TH1520 GPU power management
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=976146
Version: 7