[PATCH v3 0/5] powervr: MT8173 GPU support
Icenowy Zheng
uwu at icenowy.me
Wed Jul 29 00:45:03 PDT 2026
在 2026-07-28二的 15:29 +0900,YoungJoon Lee写道:
> 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
I remember seeing this because of the runtime power management of
drm/imagination is broken on GX6250.
Could you set the power/control file in the device's sysfs to "on"
(instead of the default "auto") to disable runpm and re-check? I
remember that another error may appear in such case but the GPU won't
be lost.
(However I am on vacation and my MT8173 machine isn't with me so I
cannot provide more information.)
Thanks,
Icenowy
>
> 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 at 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 at 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 at 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
> > >
More information about the Linux-mediatek
mailing list