Skip to content

[PW_SID:994327] [v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management - #822

Closed
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw994327
Closed

[PW_SID:994327] [v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management#822
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw994327

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 994327 applied to workflow__riscv__fixes

Name: [v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=994327
Version: 13

Michal Wilczynski added 4 commits August 22, 2025 03:59
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 an `init` callback to the `pwr_power_sequence_ops`
struct. 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 now calls the `->init()` op. For pwrseq-based
platforms, this callback calls `devm_pwrseq_get("gpu-power")`, deferring
probe if the sequencer is not yet available. For other platforms, it
falls back to the existing manual clock and reset handling. The runtime
PM callbacks continue to call the appropriate functions via the ops
table.

Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Rework the PowerVR Rogue GPU binding to use an explicit, per variant
style for defining power domain properties and add support for the
T-HEAD TH1520 SoC's GPU.

To improve clarity and precision, the binding is refactored so that
power domain items are listed explicitly for each variant [1]. The
previous method relied on an implicit, positional mapping between the
`power-domains` and `power-domain-names` properties. This change
replaces the generic rules with self contained if/then blocks for each
GPU variant, making the relationship between power domains and their
names explicit and unambiguous.

The generic if block for img,img-rogue, which previously required
power-domains and power-domain-names for all variants, is removed.
Instead, each specific GPU variant now defines its own power domain
requirements within a self-contained if/then block, making the schema
more explicit.

This new structure is then used to add support for the
`thead,th1520-gpu`. While its BXM-4-64 IP has two conceptual power
domains, the TH1520 SoC integrates them behind a single power gate. The
new binding models this with a specific rule that enforces a single
`power-domains` entry and disallows the `power-domain-names` property.

Link: https://lore.kernel.org/all/4d79c8dd-c5fb-442c-ac65-37e7176b0cdd@linaro.org/ [1]

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
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>
Acked-by: Matt Coster <matt.coster@imgtec.com>
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>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
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: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.69 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1026.66 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1327.48 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.17 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.12 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.83 seconds
Result: WARNING
Output:

WARNING: DT compatible string "thead,th1520-gpu" appears un-documented -- check ./Documentation/devicetree/bindings/
#158: FILE: drivers/gpu/drm/imagination/pvr_drv.c:1493:
+		.compatible = "thead,th1520-gpu",

total: 0 errors, 1 warnings, 0 checks, 340 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 63f4998b6652 ("drm/imagination: Use pwrseq for TH1520 GPU power management") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 340 lines checked
WARNING: DT compatible string "thead,th1520-gpu" appears un-documented -- check ./Documentation/devicetree/bindings/


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 75.51 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
module-param
Desc: Detect module_param changes
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v13,1/4] drm/imagination: Use pwrseq for TH1520 GPU power management"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.07 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1028.65 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1334.16 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.86 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.40 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.70 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.44 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
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 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
kdoc
Desc: Detects for kdoc errors
Duration: 0.85 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v13,2/4] dt-bindings: gpu: img,powervr-rogue: Add TH1520 GPU support"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.89 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1080.98 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1416.62 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.70 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.46 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.77 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.81 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
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 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[v13,3/4] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 4: "[v13,4/4] drm/imagination: Enable PowerVR driver for RISC-V"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 104.55 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 4: "[v13,4/4] drm/imagination: Enable PowerVR driver for RISC-V"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1093.09 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 4: "[v13,4/4] 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: 1418.28 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

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

@linux-riscv-bot

Copy link
Copy Markdown
Author

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

@linux-riscv-bot

Copy link
Copy Markdown
Author

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

@linux-riscv-bot

Copy link
Copy Markdown
Author

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

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 4: "[v13,4/4] 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 4: "[v13,4/4] drm/imagination: Enable PowerVR driver for RISC-V"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

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

@linux-riscv-bot

Copy link
Copy Markdown
Author

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

@linux-riscv-bot

Copy link
Copy Markdown
Author

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

@linux-riscv-bot
linux-riscv-bot deleted the pw994327 branch August 22, 2025 18:23
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