dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v3 0/5] powervr: MT8173 GPU support
       [not found] <20260727091555.1023910-1-wenst@chromium.org>
@ 2026-07-27 15:48 ` YoungJoon Lee
  2026-07-28  6:29   ` YoungJoon Lee
  2026-07-28  6:37   ` Chen-Yu Tsai
       [not found] ` <20260727091555.1023910-3-wenst@chromium.org>
  1 sibling, 2 replies; 5+ messages in thread
From: YoungJoon Lee @ 2026-07-27 15:48 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Stephen Boyd, Brian Masney, Matthias Brugger,
	AngeloGioacchino Del Regno, Alessio Belle, Luigi Santivetti,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Dan Carpenter, David Airlie, Simona Vetter, linux-clk, devicetree,
	linux-mediatek, linux-arm-kernel, imagination, dri-devel,
	linux-kernel, Icenowy Zheng

Hello,

I tested patches 1/5 through 5/5 from the MT8173 PowerVR v3 series on
an Acer Chromebook R13 (Google Elm), which uses an MT8173 SoC and a
PowerVR Rogue GX6250 GPU with BVNC 4.40.2.51.

For clarity, I applied the five actual patches numbered 1/5 through
5/5. The 0/5 cover letter itself was not applied.

Kernel:
  Linux 7.1.3-stb-cbm-pvr-v3

Relevant kernel configuration:
  CONFIG_DRM_POWERVR=m
  CONFIG_COMMON_CLK_MT8173_MFGTOP=y

Kernel command line:
  powervr.exp_hw_support=1

Firmware:
  powervr/rogue_4.40.2.51_v1.fw

The driver probes successfully, loads the firmware, and initializes the
DRM device:

  [    6.110569] powervr 13000000.gpu:
                 [drm] Running on unknown hardware; expect issues.
  [    6.117454] powervr 13000000.gpu:
                 [drm] loaded firmware
                 powervr/rogue_4.40.2.51_v1.fw
  [    6.118010] powervr 13000000.gpu:
                 [drm] FW version v1.0 (build 6476056 OS)
  [    6.122992] [drm] Initialized powervr 1.0.0
                 for 13000000.gpu on minor 1

The following DRM device nodes are created:

  /dev/dri/card0
  /dev/dri/card1
  /dev/dri/renderD128

However, on a clean boot, without manually running vulkaninfo, vkcube,
or another Vulkan application, the driver reports that the GPU has been
lost approximately six seconds after DRM initialization:

  [   12.084078] powervr 13000000.gpu:
                [drm] *ERROR* GPU device lost

The relevant boot sequence is therefore:

  [    6.110569] PowerVR probe begins
  [    6.117454] Firmware is loaded
  [    6.118010] Firmware version is reported
  [    6.122992] DRM initialization completes
  [   12.084078] GPU device lost

The unused-regulator shutdown occurs considerably later:

  [   31.712124] vgpu: disabling

Therefore, the later "vgpu: disabling" message does not appear to be
the immediate cause of the device loss. The GPU is reported lost about
20 seconds before that regulator shutdown message.

After the failure, regulator_summary reports:

  vgpu  0  0  0  normal  1000mV  0mA  700mV  1350mV

This output was collected after the GPU had already been reported lost,
so I do not know whether the regulator state was different during probe
or immediately before the failure.

The PowerVR-related clocks appear enabled in clk_summary:

  mfg_26m       26000000 Hz

  mem_mfg_in_sel
    rate:       455000000 Hz
    enable:     1
    prepare:    1

  mfg_mem
    rate:       455000000 Hz
    enable:     1
    prepare:    1
    consumer:   13000000.gpu
    clock name: mem

  mfg_sel
    rate:       455000000 Hz
    enable:     1
    prepare:    1

  mfg_g3d
    rate:       455000000 Hz
    enable:     1
    prepare:    1
    consumer:   13000000.gpu
    clock name: core

  axi_mfg_in_sel
    rate:       208000000 Hz
    enable:     2
    prepare:    2
    consumer:   power-domain@7

  mfg_axi
    rate:       208000000 Hz
    enable:     1
    prepare:    1
    consumer:   13000000.gpu
    clock name: sys

I also installed Mesa 26.1.5 and vulkan-powervr 26.1.5 and tested the
Vulkan ICD with:

  PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 \
  VK_DRIVER_FILES=/usr/share/vulkan/icd.d/powervr_mesa_icd.json \
  vulkaninfo --summary

The PowerVR ICD was found and loaded. Before hanging, Mesa printed:

  WARNING: powervr is not a conformant Vulkan implementation,
           testing use only.

  FINISHME: Missing reset support for brn51764
  FINISHME: Missing reset support for brn58839
  FINISHME: Missing support for brn62269
  FINISHME: Devices without tpu_border_colour_enhanced require entries
            for compressed formats to be stored in the table
            pre-compressed.

The vulkaninfo process then remained in uninterruptible sleep:

  PID   STAT  WCHAN             COMMAND
  3244  Dl+   synchronize_srcu  vulkaninfo --summary

It could not be terminated normally while in that state, and a reboot
was required.

However, the clean-boot log shows that "GPU device lost" occurs even
without starting vulkaninfo manually. The vulkaninfo hang may therefore
be a consequence of the GPU already being in the lost state, rather than
the original cause of the failure.

At this point, the following parts appear to work:

  - MT8173 GPU device-tree node probing
  - MFGTOP clock registration
  - PowerVR kernel module probing
  - Firmware loading
  - Firmware version reporting
  - DRM device initialization
  - Creation of card1 and renderD128

The remaining problem is that the GPU becomes lost approximately six
seconds after initialization.

Could this be related to an interrupt not being delivered, firmware
heartbeat handling, reset sequencing, runtime PM, a missing regulator
consumer relationship, or another MT8173-specific power-domain
requirement?

Please let me know which additional kernel debug options, DRM debug
settings, tracepoints, interrupt statistics, register dumps, or test
patches would be useful. I have physical access to the device and can
build and test further kernel changes.

Thank you for working on MT8173 support.

Best regards,
YoungJoon Lee

2026年7月27日(月) 18:16 Chen-Yu Tsai <wenst@chromium.org>:
>
> Hi everyone,
>
> This is v3 of my MT8173 PowerVR GPU support series.
>
> I got another inquiry on the status of this patch series, so I thought
> I'd dig it out, fix all the issues and send another version.
>
> This time around Mesa was ready for basic testing, using both vulkanmark
> and glmark2-es2-drm (with Zink). Details below.
>
> Changes since v2 (all in the clk driver patch):
> - Made COMMON_CLK_MT8173_MFGTOP depend on PM
>   - Needed since the driver implements PM domains using the generic PM
>     domain library, which also depends on PM
>   - Fixes build breakage (kernel test robot)
> - Fixed "RST_DELAY_CNT" name (Brian)
> - Dropped unused mfg_desc (Brian)
> - Added check of clk_prepare_enable()'s return value in
>   clk_mt8173_mfgtop_power_on() (Brian)
> - Saved error value for return in IS_ERR(data->clk_26m) branch
>   (Dan Carpenter / kernel test robot w/ smatch)
>
> Changes since v1:
> - Adapted to changed DT bindings
> - Dropped driver change
> - Use same power domain for "a" and "b" GPU power domains
>
>
> This series enables the PowerVR GPU found in the MT8173 SoC, found in
> some Chromebooks.
>
> This version is different from the initial powervr driver submission [1]
> in that it splits out the GPU glue layer support out of the powervr
> driver and into a separate clock and power domain driver. The glue code
> is otherwise the same, and also the same as found in the ChromeOS
> kernels, with some extra comments and macro names added where possible.
>
> Patch 1 adds a binding for the glue layer, called mfgtop. The glue layer
> contains clock and power controls for the GPU.
>
> Patch 2 adds a driver for the glue layer, implemented as a clock driver
> that also provides power domains.
>
> Patch 3 adds an entry for the MT8173 GPU and 6XT series to the PowerVR
> binding.
>
> Patch 4 corrects the clock for the GPU (called MFG) power domain.
>
> Patch 5 adds device nodes for the GPU and glue layer to the MT8173 dtsi
> file.
>
> The kernel driver successfully probes the hardware and loads the
> "rogue_4.40.2.51_v1.fw" firmware provided by Imagination Technologies [2].
> The "exp_hw_support" module parameter needs to be set for the driver to
> probe successfully.
>
> This was tested with Mesa 26.1.5 from Debian Forky. With this version
> vkmark and glmark2-es2 (over Zink) both run fine. Mesa spits out a bunch
> of warnings since the GX6250 core is not officially supported.
>
>     # PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 vkmark
>     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
>     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
>     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:73: FINISHME: Missing reset support for brn51764
>     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:76: FINISHME: Missing reset support for brn58839
>     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:523: FINISHME: Missing support for brn62269
>     MESA: warning: ../src/imagination/vulkan/pvr_arch_border.c:244: FINISHME: Devices without tpu_border_colour_enhanced require entries for compressed formats to be stored in the table pre-compressed.
>     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
>     =======================================================
>         vkmark 2025.01
>     =======================================================
>         Vendor ID:      0x1010
>         Device ID:      0x6250
>         Device Name:    PowerVR Rogue GX6250
>         Driver Version: 109056005
>         Device UUID:    d04cd6f3a25fd4900f89c151bccfdfcf
>     =======================================================
>     [vertex] device-local=true: FPS: 251 FrameTime: 3.984 ms
>     [vertex] device-local=false: FPS: 220 FrameTime: 4.545 ms
>     [texture] anisotropy=0:^C FPS: 223 FrameTime: 4.484 ms
>     =======================================================
>                                        vkmark Score: 231
>     =======================================================
>
>     # PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 glmark2-es2-drm
>     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
>     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:73: FINISHME: Missing reset support for brn51764
>     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:76: FINISHME: Missing reset support for brn58839
>     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:523: FINISHME: Missing support for brn62269
>     MESA: warning: ../src/imagination/vulkan/pvr_arch_border.c:244: FINISHME: Devices without tpu_border_colour_enhanced require entries for compressed formats to be stored in the table pre-compressed.
>     Warning: DRM_CAP_ASYNC_PAGE_FLIP not supported, falling back to 'mailbox' mode for SwapInterval(0).
>     =======================================================
>         glmark2 2023.01
>     =======================================================
>         OpenGL Information
>         GL_VENDOR:      Mesa
>         GL_RENDERER:    zink Vulkan 1.2(PowerVR Rogue GX6250 (IMAGINATION_OPEN_SOURCE_MESA))
>         GL_VERSION:     OpenGL ES 2.0 Mesa 26.1.5-1
>         Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
>         Surface Size:   1366x768 fullscreen
>     =======================================================
>     [build] use-vbo=false: FPS: 49 FrameTime: 20.473 ms
>     [build] use-vbo=true: FPS: 45 FrameTime: 22.660 ms
>     [texture] texture-filter=nearest: FPS: 45 FrameTime: 22.642 ms
>     [texture] texture-filter=linear:^C FPS: 50 FrameTime: 20.172 ms
>     =======================================================
>                                       glmark2 Score: 46
>     =======================================================
>
>
> Please have a look.
>
> Thanks
> ChenYu
>
> [1] https://lore.kernel.org/dri-devel/20220815165156.118212-2-sarah.walker@imgtec.com/
> [2] https://gitlab.freedesktop.org/imagination/linux-firmware/-/tree/powervr
>
> Chen-Yu Tsai (5):
>   dt-bindings: clock: mediatek: Add mt8173 mfgtop
>   clk: mediatek: Add mt8173-mfgtop driver
>   dt-bindings: gpu: powervr-rogue: Add MediaTek MT8173 GPU
>   arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock
>   arm64: dts: mediatek: mt8173: Add GPU device nodes
>
>  .../clock/mediatek,mt8173-mfgtop.yaml         |  70 +++++
>  .../bindings/gpu/img,powervr-rogue.yaml       |   1 +
>  arch/arm64/boot/dts/mediatek/mt8173.dtsi      |  33 ++-
>  drivers/clk/mediatek/Kconfig                  |  10 +
>  drivers/clk/mediatek/Makefile                 |   1 +
>  drivers/clk/mediatek/clk-mt8173-mfgtop.c      | 241 ++++++++++++++++++
>  include/dt-bindings/clock/mt8173-clk.h        |   7 +
>  7 files changed, 362 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/mediatek,mt8173-mfgtop.yaml
>  create mode 100644 drivers/clk/mediatek/clk-mt8173-mfgtop.c
>
> --
> 2.55.0.229.g6434b31f56-goog
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 2/5] clk: mediatek: Add mt8173-mfgtop driver
       [not found] ` <20260727091555.1023910-3-wenst@chromium.org>
@ 2026-07-27 16:16   ` Brian Masney
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Masney @ 2026-07-27 16:16 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Stephen Boyd, Matthias Brugger, AngeloGioacchino Del Regno,
	Alessio Belle, Luigi Santivetti, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Dan Carpenter, David Airlie, Simona Vetter,
	linux-clk, devicetree, linux-mediatek, linux-arm-kernel,
	imagination, dri-devel, linux-kernel, Icenowy Zheng,
	YoungJoon Lee

Hi Chen-Yu,

On Mon, Jul 27, 2026 at 05:15:51PM +0800, Chen-Yu Tsai wrote:
> The MFG (GPU) block on the MT8173 has a small glue layer, named MFG_TOP
> in the datasheet, that contains clock gates, some power sequence signal
> delays, and other unknown registers that get toggled when the GPU is
> powered on.
> 
> The clock gates are exposed as clocks provided by a clock controller,
> while the power sequencing bits are exposed as one singular power domain.
> 
> Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
> Changes since v2:
> - Made COMMON_CLK_MT8173_MFGTOP depend on PM
>   - Needed since the driver implements PM domains using the generic PM
>     domain library, which also depends on PM
>   - Fixes build breakage (kernel test robot)
> - Fixed "RST_DELAY_CNT" name (Brian)
> - Dropped unused mfg_desc (Brian)
> - Added check of clk_prepare_enable()'s return value in
>   clk_mt8173_mfgtop_power_on() (Brian)
> - Saved error value for return in IS_ERR(data->clk_26m) branch
>   (Dan Carpenter / kernel test robot w/ smatch)
> ---

[snip]

> +static int clk_mt8173_mfgtop_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct device_node *node = dev->of_node;
> +	struct mt8173_mfgtop_data *data;
> +	int ret;
> +
> +	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> +	if (!data)
> +		return -ENOMEM;
> +
> +	platform_set_drvdata(pdev, data);
> +
> +	data->clk_data = mtk_devm_alloc_clk_data(dev, ARRAY_SIZE(mfg_clks));
> +	if (!data->clk_data)
> +		return -ENOMEM;
> +
> +	/* MTK clock gates also uses regmap */
> +	data->regmap = device_node_to_regmap(node);
> +	if (IS_ERR(data->regmap))
> +		return dev_err_probe(dev, PTR_ERR(data->regmap), "Failed to get regmap\n");
> +
> +	data->child_pd.np = node;
> +	data->child_pd.args_count = 0;
> +	ret = of_parse_phandle_with_args(node, "power-domains", "#power-domain-cells", 0,
> +					 &data->parent_pd);
> +	if (ret)
> +		return dev_err_probe(dev, ret, "Failed to parse power domain\n");
> +
> +	devm_pm_runtime_enable(dev);
> +	/*
> +	 * Do a pm_runtime_resume_and_get() to workaround a possible
> +	 * deadlock between clk_register() and the genpd framework.
> +	 */
> +	ret = pm_runtime_resume_and_get(dev);
> +	if (ret) {
> +		dev_err_probe(dev, ret, "Failed to runtime resume device\n");
> +		goto put_of_node;
> +	}
> +
> +	ret = mtk_clk_register_gates(dev, node, mfg_clks, ARRAY_SIZE(mfg_clks),
> +				     data->clk_data);
> +	if (ret) {
> +		dev_err_probe(dev, ret, "Failed to register clock gates\n");
> +		goto put_pm_runtime;
> +	}
> +
> +	data->clk_26m = clk_hw_get_clk(data->clk_data->hws[CLK_MFG_26M], "26m");
> +	if (IS_ERR(data->clk_26m)) {
> +		ret = dev_err_probe(dev, PTR_ERR(data->clk_26m), "Failed to get 26 MHz clock\n");
> +		goto unregister_clks;
> +	}
> +
> +	ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, data->clk_data);
> +	if (ret) {
> +		dev_err_probe(dev, ret, "Failed to add clk OF provider\n");
> +		goto put_26m_clk;
> +	}
> +
> +	data->genpd.name = "mfg-top";
> +	data->genpd.power_on = clk_mt8173_mfgtop_power_on;
> +	data->genpd.power_off = clk_mt8173_mfgtop_power_off;
> +	ret = pm_genpd_init(&data->genpd, NULL, true);
> +	if (ret) {
> +		dev_err_probe(dev, ret, "Failed to add power domain\n");
> +		goto del_clk_provider;
> +	}
> +
> +	ret = of_genpd_add_provider_simple(node, &data->genpd);
> +	if (ret) {
> +		dev_err_probe(dev, ret, "Failed to add power domain OF provider\n");
> +		goto remove_pd;
> +	}
> +
> +	ret = of_genpd_add_subdomain(&data->parent_pd, &data->child_pd);
> +	if (ret) {
> +		dev_err_probe(dev, ret, "Failed to link PM domains\n");
> +		goto del_pd_provider;
> +	}
> +
> +	pm_runtime_put(dev);
> +	return 0;
> +
> +del_pd_provider:
> +	of_genpd_del_provider(node);
> +remove_pd:
> +	pm_genpd_remove(&data->genpd);
> +del_clk_provider:
> +	of_clk_del_provider(node);
> +put_26m_clk:
> +	clk_put(data->clk_26m);
> +unregister_clks:
> +	mtk_clk_unregister_gates(mfg_clks, ARRAY_SIZE(mfg_clks), data->clk_data);
> +put_pm_runtime:
> +	pm_runtime_put(dev);
> +put_of_node:
> +	of_node_put(data->parent_pd.np);
> +	return ret;
> +}
> +
> +static void clk_mt8173_mfgtop_remove(struct platform_device *pdev)
> +{
> +	struct mt8173_mfgtop_data *data = platform_get_drvdata(pdev);
> +	struct device_node *node = pdev->dev.of_node;
> +
> +	of_genpd_remove_subdomain(&data->parent_pd, &data->child_pd);
> +	of_genpd_del_provider(node);
> +	pm_genpd_remove(&data->genpd);
> +	of_clk_del_provider(node);
> +	clk_put(data->clk_26m);
> +	mtk_clk_unregister_gates(mfg_clks, ARRAY_SIZE(mfg_clks), data->clk_data);

Looking at the error labels in the probe, does the remove also need:

    of_node_put(data->parent_pd.np);

Otherwise this looks good. With that fixed:

Reviewed-by: Brian Masney <bmasney@redhat.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/5] powervr: MT8173 GPU support
  2026-07-27 15:48 ` [PATCH v3 0/5] powervr: MT8173 GPU support YoungJoon Lee
@ 2026-07-28  6:29   ` YoungJoon Lee
  2026-07-28  6:37   ` Chen-Yu Tsai
  1 sibling, 0 replies; 5+ messages in thread
From: YoungJoon Lee @ 2026-07-28  6:29 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Stephen Boyd, Brian Masney, Matthias Brugger,
	AngeloGioacchino Del Regno, Alessio Belle, Luigi Santivetti,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Dan Carpenter, David Airlie, Simona Vetter, linux-clk, devicetree,
	linux-mediatek, linux-arm-kernel, imagination, dri-devel,
	linux-kernel, Icenowy Zheng

Hello,

I am testing the upstream Mesa PowerVR Vulkan driver and Linux PowerVR
DRM driver on a Google Elm Chromebook with a MediaTek MT8173 SoC and a
PowerVR Rogue GX6250 GPU.

I can reliably reproduce a GPU device loss and permanent process hang
using vulkaninfo in a clean console-only environment, without GNOME,
GDM, Mutter, or another graphics application running.

System information:

Device: Google Elm Chromebook
SoC: MediaTek MT8173
GPU: PowerVR Rogue GX6250
Architecture: aarch64
Distribution: Arch Linux ARM
Kernel: Linux 7.1.3-stb-cbm-pvr-v3
Mesa: 26.1.5
Firmware: powervr/rogue_4.40.2.51_v1.fw
Kernel parameter: powervr.exp_hw_support=1
Vulkan ICD: /usr/share/vulkan/icd.d/powervr_mesa_icd.json
Vulkan library: /usr/lib/libvulkan_powervr_mesa.so

The kernel driver and firmware initially load successfully:

powervr 13000000.gpu: [drm] Running on unknown hardware; expect issues.
powervr 13000000.gpu: [drm] loaded firmware powervr/rogue_4.40.2.51_v1.fw
powervr 13000000.gpu: [drm] FW version v1.0 (build 6476056 OS)
[drm] Initialized powervr 1.0.0 for 13000000.gpu on minor 1

I then run:

env
PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1
VK_DRIVER_FILES=/usr/share/vulkan/icd.d/powervr_mesa_icd.json
VK_LOADER_DEBUG=all
LD_BIND_NOW=1
vulkaninfo --summary

The Vulkan loader successfully detects the physical device:

Original order:
[0] PowerVR Rogue GX6250
Sorted order:
[0] PowerVR Rogue GX6250

It then reaches the device-creation path:

vkCreateDevice layer callstack setup to:
<Application>
||
<Loader>
||
<Device>
Using "PowerVR Rogue GX6250" with driver:
"/usr/lib/libvulkan_powervr_mesa.so"

Immediately afterward, Mesa prints:

MESA: warning: pvr_arch_job_context.c:73:
FINISHME: Missing reset support for brn51764

MESA: warning: pvr_arch_job_context.c:76:
FINISHME: Missing reset support for brn58839

MESA: warning: pvr_arch_job_context.c:523:
FINISHME: Missing support for brn62269

MESA: warning: pvr_arch_border.c:244:
FINISHME: Devices without tpu_border_colour_enhanced require entries
for compressed formats to be stored in the table pre-compressed.

Approximately two seconds after starting vulkaninfo, the kernel reports:

powervr 13000000.gpu: [drm] ERROR GPU device lost

vulkaninfo does not return. It remains in uninterruptible sleep:

PID PPID STAT WCHAN CMD
526 434 Dl+ synchronize_srcu vulkaninfo --summary

/proc/526/status:
State: D (disk sleep)

/proc/526/wchan:
__synchronize_srcu

The current syscall is ioctl, and vulkaninfo is the only process
holding /dev/dri/renderD128.

The blocked process has this kernel stack:

__synchronize_srcu
synchronize_srcu
drm_dev_unplug
pvr_power_reset
pvr_mmu_flush_exec
pvr_mmu_op_context_destroy
pvr_vm_bind_op_fini
pvr_vm_unmap_obj_locked
pvr_vm_unmap
pvr_ioctl_vm_unmap
drm_ioctl_kernel
drm_ioctl
__arm64_sys_ioctl
invoke_syscall
el0_svc_common
do_el0_svc
el0_svc

The observed sequence is therefore:

The PowerVR kernel driver and firmware initialize successfully.
vkCreateInstance succeeds.
Physical-device enumeration succeeds and reports the GX6250.
Execution reaches vkCreateDevice.
The kernel reports GPU device lost.
The process enters the PVR VM-unmap/reset cleanup path.
It hangs indefinitely in drm_dev_unplug -> synchronize_srcu.

This appears to expose two related issues:

GPU device loss during Vulkan device creation.
A permanent kernel hang in the device-loss cleanup/reset path.

I am not assuming that the FINISHME messages for brn51764, brn58839,
brn62269, or the border-colour path are necessarily the direct cause.
I included them because they are the final Mesa messages printed
immediately before the failure.

Could you please advise whether the GX6250 hardware revision used by
MT8173 is expected to work with the current experimental driver, and
whether this should primarily be reported against Mesa, the Linux
PowerVR DRM driver, or both?

I can provide the complete logs or run a minimal Vulkan reproducer
that separately records vkCreateInstance, vkEnumeratePhysicalDevices,
and vkCreateDevice if that would be useful.

Best regards,

YoungJoon Lee

2026年7月28日(火) 0:48 YoungJoon Lee <getfeus@gmail.com>:
>
> Hello,
>
> I tested patches 1/5 through 5/5 from the MT8173 PowerVR v3 series on
> an Acer Chromebook R13 (Google Elm), which uses an MT8173 SoC and a
> PowerVR Rogue GX6250 GPU with BVNC 4.40.2.51.
>
> For clarity, I applied the five actual patches numbered 1/5 through
> 5/5. The 0/5 cover letter itself was not applied.
>
> Kernel:
>   Linux 7.1.3-stb-cbm-pvr-v3
>
> Relevant kernel configuration:
>   CONFIG_DRM_POWERVR=m
>   CONFIG_COMMON_CLK_MT8173_MFGTOP=y
>
> Kernel command line:
>   powervr.exp_hw_support=1
>
> Firmware:
>   powervr/rogue_4.40.2.51_v1.fw
>
> The driver probes successfully, loads the firmware, and initializes the
> DRM device:
>
>   [    6.110569] powervr 13000000.gpu:
>                  [drm] Running on unknown hardware; expect issues.
>   [    6.117454] powervr 13000000.gpu:
>                  [drm] loaded firmware
>                  powervr/rogue_4.40.2.51_v1.fw
>   [    6.118010] powervr 13000000.gpu:
>                  [drm] FW version v1.0 (build 6476056 OS)
>   [    6.122992] [drm] Initialized powervr 1.0.0
>                  for 13000000.gpu on minor 1
>
> The following DRM device nodes are created:
>
>   /dev/dri/card0
>   /dev/dri/card1
>   /dev/dri/renderD128
>
> However, on a clean boot, without manually running vulkaninfo, vkcube,
> or another Vulkan application, the driver reports that the GPU has been
> lost approximately six seconds after DRM initialization:
>
>   [   12.084078] powervr 13000000.gpu:
>                 [drm] *ERROR* GPU device lost
>
> The relevant boot sequence is therefore:
>
>   [    6.110569] PowerVR probe begins
>   [    6.117454] Firmware is loaded
>   [    6.118010] Firmware version is reported
>   [    6.122992] DRM initialization completes
>   [   12.084078] GPU device lost
>
> The unused-regulator shutdown occurs considerably later:
>
>   [   31.712124] vgpu: disabling
>
> Therefore, the later "vgpu: disabling" message does not appear to be
> the immediate cause of the device loss. The GPU is reported lost about
> 20 seconds before that regulator shutdown message.
>
> After the failure, regulator_summary reports:
>
>   vgpu  0  0  0  normal  1000mV  0mA  700mV  1350mV
>
> This output was collected after the GPU had already been reported lost,
> so I do not know whether the regulator state was different during probe
> or immediately before the failure.
>
> The PowerVR-related clocks appear enabled in clk_summary:
>
>   mfg_26m       26000000 Hz
>
>   mem_mfg_in_sel
>     rate:       455000000 Hz
>     enable:     1
>     prepare:    1
>
>   mfg_mem
>     rate:       455000000 Hz
>     enable:     1
>     prepare:    1
>     consumer:   13000000.gpu
>     clock name: mem
>
>   mfg_sel
>     rate:       455000000 Hz
>     enable:     1
>     prepare:    1
>
>   mfg_g3d
>     rate:       455000000 Hz
>     enable:     1
>     prepare:    1
>     consumer:   13000000.gpu
>     clock name: core
>
>   axi_mfg_in_sel
>     rate:       208000000 Hz
>     enable:     2
>     prepare:    2
>     consumer:   power-domain@7
>
>   mfg_axi
>     rate:       208000000 Hz
>     enable:     1
>     prepare:    1
>     consumer:   13000000.gpu
>     clock name: sys
>
> I also installed Mesa 26.1.5 and vulkan-powervr 26.1.5 and tested the
> Vulkan ICD with:
>
>   PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 \
>   VK_DRIVER_FILES=/usr/share/vulkan/icd.d/powervr_mesa_icd.json \
>   vulkaninfo --summary
>
> The PowerVR ICD was found and loaded. Before hanging, Mesa printed:
>
>   WARNING: powervr is not a conformant Vulkan implementation,
>            testing use only.
>
>   FINISHME: Missing reset support for brn51764
>   FINISHME: Missing reset support for brn58839
>   FINISHME: Missing support for brn62269
>   FINISHME: Devices without tpu_border_colour_enhanced require entries
>             for compressed formats to be stored in the table
>             pre-compressed.
>
> The vulkaninfo process then remained in uninterruptible sleep:
>
>   PID   STAT  WCHAN             COMMAND
>   3244  Dl+   synchronize_srcu  vulkaninfo --summary
>
> It could not be terminated normally while in that state, and a reboot
> was required.
>
> However, the clean-boot log shows that "GPU device lost" occurs even
> without starting vulkaninfo manually. The vulkaninfo hang may therefore
> be a consequence of the GPU already being in the lost state, rather than
> the original cause of the failure.
>
> At this point, the following parts appear to work:
>
>   - MT8173 GPU device-tree node probing
>   - MFGTOP clock registration
>   - PowerVR kernel module probing
>   - Firmware loading
>   - Firmware version reporting
>   - DRM device initialization
>   - Creation of card1 and renderD128
>
> The remaining problem is that the GPU becomes lost approximately six
> seconds after initialization.
>
> Could this be related to an interrupt not being delivered, firmware
> heartbeat handling, reset sequencing, runtime PM, a missing regulator
> consumer relationship, or another MT8173-specific power-domain
> requirement?
>
> Please let me know which additional kernel debug options, DRM debug
> settings, tracepoints, interrupt statistics, register dumps, or test
> patches would be useful. I have physical access to the device and can
> build and test further kernel changes.
>
> Thank you for working on MT8173 support.
>
> Best regards,
> YoungJoon Lee
>
> 2026年7月27日(月) 18:16 Chen-Yu Tsai <wenst@chromium.org>:
> >
> > Hi everyone,
> >
> > This is v3 of my MT8173 PowerVR GPU support series.
> >
> > I got another inquiry on the status of this patch series, so I thought
> > I'd dig it out, fix all the issues and send another version.
> >
> > This time around Mesa was ready for basic testing, using both vulkanmark
> > and glmark2-es2-drm (with Zink). Details below.
> >
> > Changes since v2 (all in the clk driver patch):
> > - Made COMMON_CLK_MT8173_MFGTOP depend on PM
> >   - Needed since the driver implements PM domains using the generic PM
> >     domain library, which also depends on PM
> >   - Fixes build breakage (kernel test robot)
> > - Fixed "RST_DELAY_CNT" name (Brian)
> > - Dropped unused mfg_desc (Brian)
> > - Added check of clk_prepare_enable()'s return value in
> >   clk_mt8173_mfgtop_power_on() (Brian)
> > - Saved error value for return in IS_ERR(data->clk_26m) branch
> >   (Dan Carpenter / kernel test robot w/ smatch)
> >
> > Changes since v1:
> > - Adapted to changed DT bindings
> > - Dropped driver change
> > - Use same power domain for "a" and "b" GPU power domains
> >
> >
> > This series enables the PowerVR GPU found in the MT8173 SoC, found in
> > some Chromebooks.
> >
> > This version is different from the initial powervr driver submission [1]
> > in that it splits out the GPU glue layer support out of the powervr
> > driver and into a separate clock and power domain driver. The glue code
> > is otherwise the same, and also the same as found in the ChromeOS
> > kernels, with some extra comments and macro names added where possible.
> >
> > Patch 1 adds a binding for the glue layer, called mfgtop. The glue layer
> > contains clock and power controls for the GPU.
> >
> > Patch 2 adds a driver for the glue layer, implemented as a clock driver
> > that also provides power domains.
> >
> > Patch 3 adds an entry for the MT8173 GPU and 6XT series to the PowerVR
> > binding.
> >
> > Patch 4 corrects the clock for the GPU (called MFG) power domain.
> >
> > Patch 5 adds device nodes for the GPU and glue layer to the MT8173 dtsi
> > file.
> >
> > The kernel driver successfully probes the hardware and loads the
> > "rogue_4.40.2.51_v1.fw" firmware provided by Imagination Technologies [2].
> > The "exp_hw_support" module parameter needs to be set for the driver to
> > probe successfully.
> >
> > This was tested with Mesa 26.1.5 from Debian Forky. With this version
> > vkmark and glmark2-es2 (over Zink) both run fine. Mesa spits out a bunch
> > of warnings since the GX6250 core is not officially supported.
> >
> >     # PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 vkmark
> >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:73: FINISHME: Missing reset support for brn51764
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:76: FINISHME: Missing reset support for brn58839
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:523: FINISHME: Missing support for brn62269
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_border.c:244: FINISHME: Devices without tpu_border_colour_enhanced require entries for compressed formats to be stored in the table pre-compressed.
> >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> >     =======================================================
> >         vkmark 2025.01
> >     =======================================================
> >         Vendor ID:      0x1010
> >         Device ID:      0x6250
> >         Device Name:    PowerVR Rogue GX6250
> >         Driver Version: 109056005
> >         Device UUID:    d04cd6f3a25fd4900f89c151bccfdfcf
> >     =======================================================
> >     [vertex] device-local=true: FPS: 251 FrameTime: 3.984 ms
> >     [vertex] device-local=false: FPS: 220 FrameTime: 4.545 ms
> >     [texture] anisotropy=0:^C FPS: 223 FrameTime: 4.484 ms
> >     =======================================================
> >                                        vkmark Score: 231
> >     =======================================================
> >
> >     # PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 glmark2-es2-drm
> >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:73: FINISHME: Missing reset support for brn51764
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:76: FINISHME: Missing reset support for brn58839
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:523: FINISHME: Missing support for brn62269
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_border.c:244: FINISHME: Devices without tpu_border_colour_enhanced require entries for compressed formats to be stored in the table pre-compressed.
> >     Warning: DRM_CAP_ASYNC_PAGE_FLIP not supported, falling back to 'mailbox' mode for SwapInterval(0).
> >     =======================================================
> >         glmark2 2023.01
> >     =======================================================
> >         OpenGL Information
> >         GL_VENDOR:      Mesa
> >         GL_RENDERER:    zink Vulkan 1.2(PowerVR Rogue GX6250 (IMAGINATION_OPEN_SOURCE_MESA))
> >         GL_VERSION:     OpenGL ES 2.0 Mesa 26.1.5-1
> >         Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
> >         Surface Size:   1366x768 fullscreen
> >     =======================================================
> >     [build] use-vbo=false: FPS: 49 FrameTime: 20.473 ms
> >     [build] use-vbo=true: FPS: 45 FrameTime: 22.660 ms
> >     [texture] texture-filter=nearest: FPS: 45 FrameTime: 22.642 ms
> >     [texture] texture-filter=linear:^C FPS: 50 FrameTime: 20.172 ms
> >     =======================================================
> >                                       glmark2 Score: 46
> >     =======================================================
> >
> >
> > Please have a look.
> >
> > Thanks
> > ChenYu
> >
> > [1] https://lore.kernel.org/dri-devel/20220815165156.118212-2-sarah.walker@imgtec.com/
> > [2] https://gitlab.freedesktop.org/imagination/linux-firmware/-/tree/powervr
> >
> > Chen-Yu Tsai (5):
> >   dt-bindings: clock: mediatek: Add mt8173 mfgtop
> >   clk: mediatek: Add mt8173-mfgtop driver
> >   dt-bindings: gpu: powervr-rogue: Add MediaTek MT8173 GPU
> >   arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock
> >   arm64: dts: mediatek: mt8173: Add GPU device nodes
> >
> >  .../clock/mediatek,mt8173-mfgtop.yaml         |  70 +++++
> >  .../bindings/gpu/img,powervr-rogue.yaml       |   1 +
> >  arch/arm64/boot/dts/mediatek/mt8173.dtsi      |  33 ++-
> >  drivers/clk/mediatek/Kconfig                  |  10 +
> >  drivers/clk/mediatek/Makefile                 |   1 +
> >  drivers/clk/mediatek/clk-mt8173-mfgtop.c      | 241 ++++++++++++++++++
> >  include/dt-bindings/clock/mt8173-clk.h        |   7 +
> >  7 files changed, 362 insertions(+), 1 deletion(-)
> >  create mode 100644 Documentation/devicetree/bindings/clock/mediatek,mt8173-mfgtop.yaml
> >  create mode 100644 drivers/clk/mediatek/clk-mt8173-mfgtop.c
> >
> > --
> > 2.55.0.229.g6434b31f56-goog
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/5] powervr: MT8173 GPU support
  2026-07-27 15:48 ` [PATCH v3 0/5] powervr: MT8173 GPU support YoungJoon Lee
  2026-07-28  6:29   ` YoungJoon Lee
@ 2026-07-28  6:37   ` Chen-Yu Tsai
  2026-07-28  7:47     ` YoungJoon Lee
  1 sibling, 1 reply; 5+ messages in thread
From: Chen-Yu Tsai @ 2026-07-28  6:37 UTC (permalink / raw)
  To: YoungJoon Lee
  Cc: Stephen Boyd, Brian Masney, Matthias Brugger,
	AngeloGioacchino Del Regno, Alessio Belle, Luigi Santivetti,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Dan Carpenter, David Airlie, Simona Vetter, linux-clk, devicetree,
	linux-mediatek, linux-arm-kernel, imagination, dri-devel,
	linux-kernel, Icenowy Zheng

On Mon, Jul 27, 2026 at 11:49 PM YoungJoon Lee <getfeus@gmail.com> wrote:
>
> Hello,
>
> I tested patches 1/5 through 5/5 from the MT8173 PowerVR v3 series on
> an Acer Chromebook R13 (Google Elm), which uses an MT8173 SoC and a
> PowerVR Rogue GX6250 GPU with BVNC 4.40.2.51.
>
> For clarity, I applied the five actual patches numbered 1/5 through
> 5/5. The 0/5 cover letter itself was not applied.
>
> Kernel:
>   Linux 7.1.3-stb-cbm-pvr-v3

Please at least try linux-next. There's around 30 patches for powervr
between v7.1 and next-20260727, 15 if you count from v7.1 to v7.2-rc1.

> Relevant kernel configuration:
>   CONFIG_DRM_POWERVR=m
>   CONFIG_COMMON_CLK_MT8173_MFGTOP=y
>
> Kernel command line:
>   powervr.exp_hw_support=1
>
> Firmware:
>   powervr/rogue_4.40.2.51_v1.fw
>
> The driver probes successfully, loads the firmware, and initializes the
> DRM device:
>
>   [    6.110569] powervr 13000000.gpu:
>                  [drm] Running on unknown hardware; expect issues.
>   [    6.117454] powervr 13000000.gpu:
>                  [drm] loaded firmware
>                  powervr/rogue_4.40.2.51_v1.fw
>   [    6.118010] powervr 13000000.gpu:
>                  [drm] FW version v1.0 (build 6476056 OS)
>   [    6.122992] [drm] Initialized powervr 1.0.0
>                  for 13000000.gpu on minor 1
>
> The following DRM device nodes are created:
>
>   /dev/dri/card0
>   /dev/dri/card1
>   /dev/dri/renderD128
>
> However, on a clean boot, without manually running vulkaninfo, vkcube,
> or another Vulkan application, the driver reports that the GPU has been
> lost approximately six seconds after DRM initialization:
>
>   [   12.084078] powervr 13000000.gpu:
>                 [drm] *ERROR* GPU device lost
>
> The relevant boot sequence is therefore:
>
>   [    6.110569] PowerVR probe begins
>   [    6.117454] Firmware is loaded
>   [    6.118010] Firmware version is reported
>   [    6.122992] DRM initialization completes
>   [   12.084078] GPU device lost
>
> The unused-regulator shutdown occurs considerably later:
>
>   [   31.712124] vgpu: disabling
>
> Therefore, the later "vgpu: disabling" message does not appear to be
> the immediate cause of the device loss. The GPU is reported lost about
> 20 seconds before that regulator shutdown message.
>
> After the failure, regulator_summary reports:
>
>   vgpu  0  0  0  normal  1000mV  0mA  700mV  1350mV

This is unrelated. This regulator output is _really_ unused. "vgpu" is
just the default name on the PMIC.


> This output was collected after the GPU had already been reported lost,
> so I do not know whether the regulator state was different during probe
> or immediately before the failure.
>
> The PowerVR-related clocks appear enabled in clk_summary:
>
>   mfg_26m       26000000 Hz
>
>   mem_mfg_in_sel
>     rate:       455000000 Hz
>     enable:     1
>     prepare:    1
>
>   mfg_mem
>     rate:       455000000 Hz
>     enable:     1
>     prepare:    1
>     consumer:   13000000.gpu
>     clock name: mem
>
>   mfg_sel
>     rate:       455000000 Hz
>     enable:     1
>     prepare:    1
>
>   mfg_g3d
>     rate:       455000000 Hz
>     enable:     1
>     prepare:    1
>     consumer:   13000000.gpu
>     clock name: core
>
>   axi_mfg_in_sel
>     rate:       208000000 Hz
>     enable:     2
>     prepare:    2
>     consumer:   power-domain@7
>
>   mfg_axi
>     rate:       208000000 Hz
>     enable:     1
>     prepare:    1
>     consumer:   13000000.gpu
>     clock name: sys
>
> I also installed Mesa 26.1.5 and vulkan-powervr 26.1.5 and tested the
> Vulkan ICD with:
>
>   PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 \
>   VK_DRIVER_FILES=/usr/share/vulkan/icd.d/powervr_mesa_icd.json \
>   vulkaninfo --summary
>
> The PowerVR ICD was found and loaded. Before hanging, Mesa printed:
>
>   WARNING: powervr is not a conformant Vulkan implementation,
>            testing use only.
>
>   FINISHME: Missing reset support for brn51764
>   FINISHME: Missing reset support for brn58839
>   FINISHME: Missing support for brn62269
>   FINISHME: Devices without tpu_border_colour_enhanced require entries
>             for compressed formats to be stored in the table
>             pre-compressed.
>
> The vulkaninfo process then remained in uninterruptible sleep:
>
>   PID   STAT  WCHAN             COMMAND
>   3244  Dl+   synchronize_srcu  vulkaninfo --summary
>
> It could not be terminated normally while in that state, and a reboot
> was required.
>
> However, the clean-boot log shows that "GPU device lost" occurs even
> without starting vulkaninfo manually. The vulkaninfo hang may therefore
> be a consequence of the GPU already being in the lost state, rather than
> the original cause of the failure.
>
> At this point, the following parts appear to work:
>
>   - MT8173 GPU device-tree node probing
>   - MFGTOP clock registration
>   - PowerVR kernel module probing
>   - Firmware loading
>   - Firmware version reporting
>   - DRM device initialization
>   - Creation of card1 and renderD128
>
> The remaining problem is that the GPU becomes lost approximately six
> seconds after initialization.

Sorry. I'm not seeing this on my device. I'm running the patches on
top of next-20260727 this round.


ChenYu

> Could this be related to an interrupt not being delivered, firmware
> heartbeat handling, reset sequencing, runtime PM, a missing regulator
> consumer relationship, or another MT8173-specific power-domain
> requirement?
>
> Please let me know which additional kernel debug options, DRM debug
> settings, tracepoints, interrupt statistics, register dumps, or test
> patches would be useful. I have physical access to the device and can
> build and test further kernel changes.
>
> Thank you for working on MT8173 support.
>
> Best regards,
> YoungJoon Lee
>
> 2026年7月27日(月) 18:16 Chen-Yu Tsai <wenst@chromium.org>:
> >
> > Hi everyone,
> >
> > This is v3 of my MT8173 PowerVR GPU support series.
> >
> > I got another inquiry on the status of this patch series, so I thought
> > I'd dig it out, fix all the issues and send another version.
> >
> > This time around Mesa was ready for basic testing, using both vulkanmark
> > and glmark2-es2-drm (with Zink). Details below.
> >
> > Changes since v2 (all in the clk driver patch):
> > - Made COMMON_CLK_MT8173_MFGTOP depend on PM
> >   - Needed since the driver implements PM domains using the generic PM
> >     domain library, which also depends on PM
> >   - Fixes build breakage (kernel test robot)
> > - Fixed "RST_DELAY_CNT" name (Brian)
> > - Dropped unused mfg_desc (Brian)
> > - Added check of clk_prepare_enable()'s return value in
> >   clk_mt8173_mfgtop_power_on() (Brian)
> > - Saved error value for return in IS_ERR(data->clk_26m) branch
> >   (Dan Carpenter / kernel test robot w/ smatch)
> >
> > Changes since v1:
> > - Adapted to changed DT bindings
> > - Dropped driver change
> > - Use same power domain for "a" and "b" GPU power domains
> >
> >
> > This series enables the PowerVR GPU found in the MT8173 SoC, found in
> > some Chromebooks.
> >
> > This version is different from the initial powervr driver submission [1]
> > in that it splits out the GPU glue layer support out of the powervr
> > driver and into a separate clock and power domain driver. The glue code
> > is otherwise the same, and also the same as found in the ChromeOS
> > kernels, with some extra comments and macro names added where possible.
> >
> > Patch 1 adds a binding for the glue layer, called mfgtop. The glue layer
> > contains clock and power controls for the GPU.
> >
> > Patch 2 adds a driver for the glue layer, implemented as a clock driver
> > that also provides power domains.
> >
> > Patch 3 adds an entry for the MT8173 GPU and 6XT series to the PowerVR
> > binding.
> >
> > Patch 4 corrects the clock for the GPU (called MFG) power domain.
> >
> > Patch 5 adds device nodes for the GPU and glue layer to the MT8173 dtsi
> > file.
> >
> > The kernel driver successfully probes the hardware and loads the
> > "rogue_4.40.2.51_v1.fw" firmware provided by Imagination Technologies [2].
> > The "exp_hw_support" module parameter needs to be set for the driver to
> > probe successfully.
> >
> > This was tested with Mesa 26.1.5 from Debian Forky. With this version
> > vkmark and glmark2-es2 (over Zink) both run fine. Mesa spits out a bunch
> > of warnings since the GX6250 core is not officially supported.
> >
> >     # PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 vkmark
> >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:73: FINISHME: Missing reset support for brn51764
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:76: FINISHME: Missing reset support for brn58839
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:523: FINISHME: Missing support for brn62269
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_border.c:244: FINISHME: Devices without tpu_border_colour_enhanced require entries for compressed formats to be stored in the table pre-compressed.
> >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> >     =======================================================
> >         vkmark 2025.01
> >     =======================================================
> >         Vendor ID:      0x1010
> >         Device ID:      0x6250
> >         Device Name:    PowerVR Rogue GX6250
> >         Driver Version: 109056005
> >         Device UUID:    d04cd6f3a25fd4900f89c151bccfdfcf
> >     =======================================================
> >     [vertex] device-local=true: FPS: 251 FrameTime: 3.984 ms
> >     [vertex] device-local=false: FPS: 220 FrameTime: 4.545 ms
> >     [texture] anisotropy=0:^C FPS: 223 FrameTime: 4.484 ms
> >     =======================================================
> >                                        vkmark Score: 231
> >     =======================================================
> >
> >     # PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 glmark2-es2-drm
> >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:73: FINISHME: Missing reset support for brn51764
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:76: FINISHME: Missing reset support for brn58839
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:523: FINISHME: Missing support for brn62269
> >     MESA: warning: ../src/imagination/vulkan/pvr_arch_border.c:244: FINISHME: Devices without tpu_border_colour_enhanced require entries for compressed formats to be stored in the table pre-compressed.
> >     Warning: DRM_CAP_ASYNC_PAGE_FLIP not supported, falling back to 'mailbox' mode for SwapInterval(0).
> >     =======================================================
> >         glmark2 2023.01
> >     =======================================================
> >         OpenGL Information
> >         GL_VENDOR:      Mesa
> >         GL_RENDERER:    zink Vulkan 1.2(PowerVR Rogue GX6250 (IMAGINATION_OPEN_SOURCE_MESA))
> >         GL_VERSION:     OpenGL ES 2.0 Mesa 26.1.5-1
> >         Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
> >         Surface Size:   1366x768 fullscreen
> >     =======================================================
> >     [build] use-vbo=false: FPS: 49 FrameTime: 20.473 ms
> >     [build] use-vbo=true: FPS: 45 FrameTime: 22.660 ms
> >     [texture] texture-filter=nearest: FPS: 45 FrameTime: 22.642 ms
> >     [texture] texture-filter=linear:^C FPS: 50 FrameTime: 20.172 ms
> >     =======================================================
> >                                       glmark2 Score: 46
> >     =======================================================
> >
> >
> > Please have a look.
> >
> > Thanks
> > ChenYu
> >
> > [1] https://lore.kernel.org/dri-devel/20220815165156.118212-2-sarah.walker@imgtec.com/
> > [2] https://gitlab.freedesktop.org/imagination/linux-firmware/-/tree/powervr
> >
> > Chen-Yu Tsai (5):
> >   dt-bindings: clock: mediatek: Add mt8173 mfgtop
> >   clk: mediatek: Add mt8173-mfgtop driver
> >   dt-bindings: gpu: powervr-rogue: Add MediaTek MT8173 GPU
> >   arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock
> >   arm64: dts: mediatek: mt8173: Add GPU device nodes
> >
> >  .../clock/mediatek,mt8173-mfgtop.yaml         |  70 +++++
> >  .../bindings/gpu/img,powervr-rogue.yaml       |   1 +
> >  arch/arm64/boot/dts/mediatek/mt8173.dtsi      |  33 ++-
> >  drivers/clk/mediatek/Kconfig                  |  10 +
> >  drivers/clk/mediatek/Makefile                 |   1 +
> >  drivers/clk/mediatek/clk-mt8173-mfgtop.c      | 241 ++++++++++++++++++
> >  include/dt-bindings/clock/mt8173-clk.h        |   7 +
> >  7 files changed, 362 insertions(+), 1 deletion(-)
> >  create mode 100644 Documentation/devicetree/bindings/clock/mediatek,mt8173-mfgtop.yaml
> >  create mode 100644 drivers/clk/mediatek/clk-mt8173-mfgtop.c
> >
> > --
> > 2.55.0.229.g6434b31f56-goog
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/5] powervr: MT8173 GPU support
  2026-07-28  6:37   ` Chen-Yu Tsai
@ 2026-07-28  7:47     ` YoungJoon Lee
  0 siblings, 0 replies; 5+ messages in thread
From: YoungJoon Lee @ 2026-07-28  7:47 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Stephen Boyd, Brian Masney, Matthias Brugger,
	AngeloGioacchino Del Regno, Alessio Belle, Luigi Santivetti,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Dan Carpenter, David Airlie, Simona Vetter, linux-clk, devicetree,
	linux-mediatek, linux-arm-kernel, imagination, dri-devel,
	linux-kernel, Icenowy Zheng

Hello ChenYu,

Thank you for the clarification.

I understand that the "vgpu" regulator entry is unrelated, and I will
exclude it from further investigation.

I also noticed an important issue with my earlier "clean boot" test:
although I had not manually started vulkaninfo, the system was still
booting the graphical target, so GDM/GNOME had already accessed the
PowerVR Vulkan driver.

I repeated the test in a true console-only environment. In that case,
the PowerVR driver and firmware initialized successfully and the GPU
remained alive until I manually ran vulkaninfo. The GPU was then reported
lost approximately two seconds after vulkaninfo entered the
vkCreateDevice path.

However, this was still tested on Linux 7.1.3 with the MT8173 v3 series
applied. I will rebuild and retest on top of next-20260727 as you
requested before drawing further conclusions.

Thank you,

YoungJoon Lee

2026年7月28日(火) 15:37 Chen-Yu Tsai <wenst@chromium.org>:
>
> On Mon, Jul 27, 2026 at 11:49 PM YoungJoon Lee <getfeus@gmail.com> wrote:
> >
> > Hello,
> >
> > I tested patches 1/5 through 5/5 from the MT8173 PowerVR v3 series on
> > an Acer Chromebook R13 (Google Elm), which uses an MT8173 SoC and a
> > PowerVR Rogue GX6250 GPU with BVNC 4.40.2.51.
> >
> > For clarity, I applied the five actual patches numbered 1/5 through
> > 5/5. The 0/5 cover letter itself was not applied.
> >
> > Kernel:
> >   Linux 7.1.3-stb-cbm-pvr-v3
>
> Please at least try linux-next. There's around 30 patches for powervr
> between v7.1 and next-20260727, 15 if you count from v7.1 to v7.2-rc1.
>
> > Relevant kernel configuration:
> >   CONFIG_DRM_POWERVR=m
> >   CONFIG_COMMON_CLK_MT8173_MFGTOP=y
> >
> > Kernel command line:
> >   powervr.exp_hw_support=1
> >
> > Firmware:
> >   powervr/rogue_4.40.2.51_v1.fw
> >
> > The driver probes successfully, loads the firmware, and initializes the
> > DRM device:
> >
> >   [    6.110569] powervr 13000000.gpu:
> >                  [drm] Running on unknown hardware; expect issues.
> >   [    6.117454] powervr 13000000.gpu:
> >                  [drm] loaded firmware
> >                  powervr/rogue_4.40.2.51_v1.fw
> >   [    6.118010] powervr 13000000.gpu:
> >                  [drm] FW version v1.0 (build 6476056 OS)
> >   [    6.122992] [drm] Initialized powervr 1.0.0
> >                  for 13000000.gpu on minor 1
> >
> > The following DRM device nodes are created:
> >
> >   /dev/dri/card0
> >   /dev/dri/card1
> >   /dev/dri/renderD128
> >
> > However, on a clean boot, without manually running vulkaninfo, vkcube,
> > or another Vulkan application, the driver reports that the GPU has been
> > lost approximately six seconds after DRM initialization:
> >
> >   [   12.084078] powervr 13000000.gpu:
> >                 [drm] *ERROR* GPU device lost
> >
> > The relevant boot sequence is therefore:
> >
> >   [    6.110569] PowerVR probe begins
> >   [    6.117454] Firmware is loaded
> >   [    6.118010] Firmware version is reported
> >   [    6.122992] DRM initialization completes
> >   [   12.084078] GPU device lost
> >
> > The unused-regulator shutdown occurs considerably later:
> >
> >   [   31.712124] vgpu: disabling
> >
> > Therefore, the later "vgpu: disabling" message does not appear to be
> > the immediate cause of the device loss. The GPU is reported lost about
> > 20 seconds before that regulator shutdown message.
> >
> > After the failure, regulator_summary reports:
> >
> >   vgpu  0  0  0  normal  1000mV  0mA  700mV  1350mV
>
> This is unrelated. This regulator output is _really_ unused. "vgpu" is
> just the default name on the PMIC.
>
>
> > This output was collected after the GPU had already been reported lost,
> > so I do not know whether the regulator state was different during probe
> > or immediately before the failure.
> >
> > The PowerVR-related clocks appear enabled in clk_summary:
> >
> >   mfg_26m       26000000 Hz
> >
> >   mem_mfg_in_sel
> >     rate:       455000000 Hz
> >     enable:     1
> >     prepare:    1
> >
> >   mfg_mem
> >     rate:       455000000 Hz
> >     enable:     1
> >     prepare:    1
> >     consumer:   13000000.gpu
> >     clock name: mem
> >
> >   mfg_sel
> >     rate:       455000000 Hz
> >     enable:     1
> >     prepare:    1
> >
> >   mfg_g3d
> >     rate:       455000000 Hz
> >     enable:     1
> >     prepare:    1
> >     consumer:   13000000.gpu
> >     clock name: core
> >
> >   axi_mfg_in_sel
> >     rate:       208000000 Hz
> >     enable:     2
> >     prepare:    2
> >     consumer:   power-domain@7
> >
> >   mfg_axi
> >     rate:       208000000 Hz
> >     enable:     1
> >     prepare:    1
> >     consumer:   13000000.gpu
> >     clock name: sys
> >
> > I also installed Mesa 26.1.5 and vulkan-powervr 26.1.5 and tested the
> > Vulkan ICD with:
> >
> >   PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 \
> >   VK_DRIVER_FILES=/usr/share/vulkan/icd.d/powervr_mesa_icd.json \
> >   vulkaninfo --summary
> >
> > The PowerVR ICD was found and loaded. Before hanging, Mesa printed:
> >
> >   WARNING: powervr is not a conformant Vulkan implementation,
> >            testing use only.
> >
> >   FINISHME: Missing reset support for brn51764
> >   FINISHME: Missing reset support for brn58839
> >   FINISHME: Missing support for brn62269
> >   FINISHME: Devices without tpu_border_colour_enhanced require entries
> >             for compressed formats to be stored in the table
> >             pre-compressed.
> >
> > The vulkaninfo process then remained in uninterruptible sleep:
> >
> >   PID   STAT  WCHAN             COMMAND
> >   3244  Dl+   synchronize_srcu  vulkaninfo --summary
> >
> > It could not be terminated normally while in that state, and a reboot
> > was required.
> >
> > However, the clean-boot log shows that "GPU device lost" occurs even
> > without starting vulkaninfo manually. The vulkaninfo hang may therefore
> > be a consequence of the GPU already being in the lost state, rather than
> > the original cause of the failure.
> >
> > At this point, the following parts appear to work:
> >
> >   - MT8173 GPU device-tree node probing
> >   - MFGTOP clock registration
> >   - PowerVR kernel module probing
> >   - Firmware loading
> >   - Firmware version reporting
> >   - DRM device initialization
> >   - Creation of card1 and renderD128
> >
> > The remaining problem is that the GPU becomes lost approximately six
> > seconds after initialization.
>
> Sorry. I'm not seeing this on my device. I'm running the patches on
> top of next-20260727 this round.
>
>
> ChenYu
>
> > Could this be related to an interrupt not being delivered, firmware
> > heartbeat handling, reset sequencing, runtime PM, a missing regulator
> > consumer relationship, or another MT8173-specific power-domain
> > requirement?
> >
> > Please let me know which additional kernel debug options, DRM debug
> > settings, tracepoints, interrupt statistics, register dumps, or test
> > patches would be useful. I have physical access to the device and can
> > build and test further kernel changes.
> >
> > Thank you for working on MT8173 support.
> >
> > Best regards,
> > YoungJoon Lee
> >
> > 2026年7月27日(月) 18:16 Chen-Yu Tsai <wenst@chromium.org>:
> > >
> > > Hi everyone,
> > >
> > > This is v3 of my MT8173 PowerVR GPU support series.
> > >
> > > I got another inquiry on the status of this patch series, so I thought
> > > I'd dig it out, fix all the issues and send another version.
> > >
> > > This time around Mesa was ready for basic testing, using both vulkanmark
> > > and glmark2-es2-drm (with Zink). Details below.
> > >
> > > Changes since v2 (all in the clk driver patch):
> > > - Made COMMON_CLK_MT8173_MFGTOP depend on PM
> > >   - Needed since the driver implements PM domains using the generic PM
> > >     domain library, which also depends on PM
> > >   - Fixes build breakage (kernel test robot)
> > > - Fixed "RST_DELAY_CNT" name (Brian)
> > > - Dropped unused mfg_desc (Brian)
> > > - Added check of clk_prepare_enable()'s return value in
> > >   clk_mt8173_mfgtop_power_on() (Brian)
> > > - Saved error value for return in IS_ERR(data->clk_26m) branch
> > >   (Dan Carpenter / kernel test robot w/ smatch)
> > >
> > > Changes since v1:
> > > - Adapted to changed DT bindings
> > > - Dropped driver change
> > > - Use same power domain for "a" and "b" GPU power domains
> > >
> > >
> > > This series enables the PowerVR GPU found in the MT8173 SoC, found in
> > > some Chromebooks.
> > >
> > > This version is different from the initial powervr driver submission [1]
> > > in that it splits out the GPU glue layer support out of the powervr
> > > driver and into a separate clock and power domain driver. The glue code
> > > is otherwise the same, and also the same as found in the ChromeOS
> > > kernels, with some extra comments and macro names added where possible.
> > >
> > > Patch 1 adds a binding for the glue layer, called mfgtop. The glue layer
> > > contains clock and power controls for the GPU.
> > >
> > > Patch 2 adds a driver for the glue layer, implemented as a clock driver
> > > that also provides power domains.
> > >
> > > Patch 3 adds an entry for the MT8173 GPU and 6XT series to the PowerVR
> > > binding.
> > >
> > > Patch 4 corrects the clock for the GPU (called MFG) power domain.
> > >
> > > Patch 5 adds device nodes for the GPU and glue layer to the MT8173 dtsi
> > > file.
> > >
> > > The kernel driver successfully probes the hardware and loads the
> > > "rogue_4.40.2.51_v1.fw" firmware provided by Imagination Technologies [2].
> > > The "exp_hw_support" module parameter needs to be set for the driver to
> > > probe successfully.
> > >
> > > This was tested with Mesa 26.1.5 from Debian Forky. With this version
> > > vkmark and glmark2-es2 (over Zink) both run fine. Mesa spits out a bunch
> > > of warnings since the GX6250 core is not officially supported.
> > >
> > >     # PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 vkmark
> > >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> > >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> > >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:73: FINISHME: Missing reset support for brn51764
> > >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:76: FINISHME: Missing reset support for brn58839
> > >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:523: FINISHME: Missing support for brn62269
> > >     MESA: warning: ../src/imagination/vulkan/pvr_arch_border.c:244: FINISHME: Devices without tpu_border_colour_enhanced require entries for compressed formats to be stored in the table pre-compressed.
> > >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> > >     =======================================================
> > >         vkmark 2025.01
> > >     =======================================================
> > >         Vendor ID:      0x1010
> > >         Device ID:      0x6250
> > >         Device Name:    PowerVR Rogue GX6250
> > >         Driver Version: 109056005
> > >         Device UUID:    d04cd6f3a25fd4900f89c151bccfdfcf
> > >     =======================================================
> > >     [vertex] device-local=true: FPS: 251 FrameTime: 3.984 ms
> > >     [vertex] device-local=false: FPS: 220 FrameTime: 4.545 ms
> > >     [texture] anisotropy=0:^C FPS: 223 FrameTime: 4.484 ms
> > >     =======================================================
> > >                                        vkmark Score: 231
> > >     =======================================================
> > >
> > >     # PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1 glmark2-es2-drm
> > >     WARNING: powervr is not a conformant Vulkan implementation, testing use only.
> > >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:73: FINISHME: Missing reset support for brn51764
> > >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:76: FINISHME: Missing reset support for brn58839
> > >     MESA: warning: ../src/imagination/vulkan/pvr_arch_job_context.c:523: FINISHME: Missing support for brn62269
> > >     MESA: warning: ../src/imagination/vulkan/pvr_arch_border.c:244: FINISHME: Devices without tpu_border_colour_enhanced require entries for compressed formats to be stored in the table pre-compressed.
> > >     Warning: DRM_CAP_ASYNC_PAGE_FLIP not supported, falling back to 'mailbox' mode for SwapInterval(0).
> > >     =======================================================
> > >         glmark2 2023.01
> > >     =======================================================
> > >         OpenGL Information
> > >         GL_VENDOR:      Mesa
> > >         GL_RENDERER:    zink Vulkan 1.2(PowerVR Rogue GX6250 (IMAGINATION_OPEN_SOURCE_MESA))
> > >         GL_VERSION:     OpenGL ES 2.0 Mesa 26.1.5-1
> > >         Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
> > >         Surface Size:   1366x768 fullscreen
> > >     =======================================================
> > >     [build] use-vbo=false: FPS: 49 FrameTime: 20.473 ms
> > >     [build] use-vbo=true: FPS: 45 FrameTime: 22.660 ms
> > >     [texture] texture-filter=nearest: FPS: 45 FrameTime: 22.642 ms
> > >     [texture] texture-filter=linear:^C FPS: 50 FrameTime: 20.172 ms
> > >     =======================================================
> > >                                       glmark2 Score: 46
> > >     =======================================================
> > >
> > >
> > > Please have a look.
> > >
> > > Thanks
> > > ChenYu
> > >
> > > [1] https://lore.kernel.org/dri-devel/20220815165156.118212-2-sarah.walker@imgtec.com/
> > > [2] https://gitlab.freedesktop.org/imagination/linux-firmware/-/tree/powervr
> > >
> > > Chen-Yu Tsai (5):
> > >   dt-bindings: clock: mediatek: Add mt8173 mfgtop
> > >   clk: mediatek: Add mt8173-mfgtop driver
> > >   dt-bindings: gpu: powervr-rogue: Add MediaTek MT8173 GPU
> > >   arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock
> > >   arm64: dts: mediatek: mt8173: Add GPU device nodes
> > >
> > >  .../clock/mediatek,mt8173-mfgtop.yaml         |  70 +++++
> > >  .../bindings/gpu/img,powervr-rogue.yaml       |   1 +
> > >  arch/arm64/boot/dts/mediatek/mt8173.dtsi      |  33 ++-
> > >  drivers/clk/mediatek/Kconfig                  |  10 +
> > >  drivers/clk/mediatek/Makefile                 |   1 +
> > >  drivers/clk/mediatek/clk-mt8173-mfgtop.c      | 241 ++++++++++++++++++
> > >  include/dt-bindings/clock/mt8173-clk.h        |   7 +
> > >  7 files changed, 362 insertions(+), 1 deletion(-)
> > >  create mode 100644 Documentation/devicetree/bindings/clock/mediatek,mt8173-mfgtop.yaml
> > >  create mode 100644 drivers/clk/mediatek/clk-mt8173-mfgtop.c
> > >
> > > --
> > > 2.55.0.229.g6434b31f56-goog
> > >

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-28 13:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260727091555.1023910-1-wenst@chromium.org>
2026-07-27 15:48 ` [PATCH v3 0/5] powervr: MT8173 GPU support YoungJoon Lee
2026-07-28  6:29   ` YoungJoon Lee
2026-07-28  6:37   ` Chen-Yu Tsai
2026-07-28  7:47     ` YoungJoon Lee
     [not found] ` <20260727091555.1023910-3-wenst@chromium.org>
2026-07-27 16:16   ` [PATCH v3 2/5] clk: mediatek: Add mt8173-mfgtop driver Brian Masney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox