Skip to content

[PW_SID:967456] [v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer#459

Closed
linux-riscv-bot wants to merge 9 commits into
workflowfrom
pw967456
Closed

[PW_SID:967456] [v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer#459
linux-riscv-bot wants to merge 9 commits into
workflowfrom
pw967456

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 967456 applied to workflow

Name: [v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=967456
Version: 3

Linux RISC-V bot and others added 9 commits May 31, 2025 15:43
Introduce device tree bindings for a new power sequencer provider
dedicated to the T-HEAD TH1520 SoC's GPU.

The thead,th1520-gpu-pwrseq compatible designates a node that will
manage the complex power-up and power-down sequence for the GPU. This
sequencer requires a handle to the GPU's clock generator reset line
(gpu-clkgen), which is specified in its device tree node.

This binding will be used by a new pwrseq driver to abstract the
SoC specific power management details from the generic GPU driver.

Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Introduce the pwrseq-thead-gpu driver, a power sequencer provider for
the Imagination BXM-4-64 GPU on the T-HEAD TH1520 SoC.

The TH1520 GPU requires a specific sequence to correctly initialize and
power down its resources:
 - Enable GPU clocks (core and sys).
 - De-assert the GPU clock generator reset (clkgen_reset).
 - Introduce a short hardware-required delay.
 - De-assert the GPU core reset. The power-down sequence performs these
   steps in reverse.

Implement this sequence via the pwrseq_power_on and pwrseq_power_off
callbacks. It binds to the "thead,th1520-gpu-pwrseq" device tree node,
from which it acquires the clkgen_reset.

Crucially, the driver's match function is called when a consumer
(the Imagination GPU driver) requests the "gpu-power" target. During
this match, the sequencer uses devm_clk_bulk_get() and
devm_reset_control_get_exclusive() on the consumer's device to
obtain handles to the GPU's "core" and "sys" clocks, and the GPU core
reset. These, along with its own clkgen_reset, allow it to perform
the complete sequence.

Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Update the Imagination PVR DRM driver to leverage the pwrseq framework
for managing the power sequence of the GPU on the T-HEAD TH1520 SoC.

In pvr_device_init(), the driver now attempts to get a handle to the
"gpu-power" sequencer target using devm_pwrseq_get(). If successful,
the responsibility for powering on and off the GPU's core clocks and
resets is delegated to the power sequencer. Consequently, the GPU
driver conditionally skips acquiring the GPU reset line if the pwrseq
handle is obtained, as the sequencer's match function will acquire it.
Clock handles are still acquired by the GPU driver for other purposes
like devfreq.

The runtime PM callbacks, pvr_power_device_resume() and
pvr_power_device_suspend(), are modified to call pwrseq_power_on() and
pwrseq_power_off() respectively when the sequencer is present.  If no
sequencer is found, the driver falls back to its existing manual clock
and reset management. A helper function,
pvr_power_off_sequence_manual(), is introduced to encapsulate the manual
power-down logic.

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 device tree bindings 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. This allows the Imagination DRM driver
to correctly bind to the GPU node defined in the TH1520 device tree.

The power-domains property requirement for img,img-bxm-4-64 is also
ensured by adding it to the relevant allOf condition.

Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
TH1520_RESET_ID_GPU_CLKGEN and TH1520_RESET_ID_GPU are required for GPU
power sequencing to work.  To make these symbols available, add the
necessary include for the T-HEAD TH1520 reset controller bindings.

This change was dropped during conflict resolution [1].

[1] - https://lore.kernel.org/all/aAvfn2mq0Ksi8DF2@x1/

Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the device tree node for the T-HEAD TH1520 GPU power sequencer
(gpu_pwrseq) to the th1520.dtsi file.

This node instantiates the thead,th1520-gpu-pwrseq driver, which
is responsible for managing the GPU's power-on/off sequence. The node
specifies the gpu-clkgen reset, which is one of the resources
controlled by this sequencer.

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.

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.

Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 111.02 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 910.77 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1161.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 23.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 24.36 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.04 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 71.56 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
module-param
Desc: Detect module_param changes
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v3,1/8] dt-bindings: power: Add T-HEAD TH1520 GPU power sequencer"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 108.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 938.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1202.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 22.58 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 23.47 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.58 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 70.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v3,2/8] power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1241.53 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 22.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 23.08 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.67 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 72.78 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
kdoc
Desc: Detects for kdoc errors
Duration: 0.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v3,8/8] drm/imagination: Enable PowerVR driver for RISC-V"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow branch 18 times, most recently from 2f55822 to e69f607 Compare June 5, 2025 20:18
@linux-riscv-bot linux-riscv-bot deleted the pw967456 branch June 6, 2025 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant