Skip to content

drm/lima: power the MediaTek SMI larb on MT7623#191

Merged
frank-w merged 1 commit into
frank-w:6.12-mainfrom
filipleple:6.12_mali_450_lima_fix
Jul 6, 2026
Merged

drm/lima: power the MediaTek SMI larb on MT7623#191
frank-w merged 1 commit into
frank-w:6.12-mainfrom
filipleple:6.12_mali_450_lima_fix

Conversation

@filipleple

Copy link
Copy Markdown
Contributor

As per commit message, I couldn't get GPU init to work on BPI R2. It was failing with this message:

lima 13040000.gpu: mmu gpmmu dte write test fail
lima: probe of 13040000.gpu failed with error -5

This is the patch that resolved the issue, and allowed me to get glxgears spinning. I'm new to kernel work, so if this is not the right solution, or I should start from submitting to the newest kernel I'd appreciate any feedback. Thanks!

On MediaTek SoCs the Mali-450 masters the system bus through an SMI
local arbiter ("larb") that lives in a different power domain (DISP)
than the GPU core itself (MFG). genpd only attaches the GPU's own
domain, so without explicitly powering the SMI larb the GPU register
block is unreachable on the bus: every register reads back 0 and the
first MMU register write-readback fails:

lima 13040000.gpu: mmu gpmmu dte write test fail
lima: probe of 13040000.gpu failed with error -5

The old mali-utgard driver handled this with larb = <&larb0> plus
mtk_smi_larb_get(); that helper was removed from mainline, so model the
dependency with a device link to the larb device instead (as mtk-drm
and mtk-vcodec do). Powering the larb also pulls up the SMI-common it
chains to via the larb driver's own link.

The "mediatek,larb" phandle is optional, so non-MediaTek Utgard parts
are unaffected. The larb is held powered for the GPU's whole bound
lifetime because lima runs the MMU dte test in lima_device_init()
before pm_runtime is enabled for the GPU, so the device link cannot
resume the larb in time on its own.

Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
@frank-w frank-w merged commit 93510bb into frank-w:6.12-main Jul 6, 2026
@frank-w

frank-w commented Jul 6, 2026

Copy link
Copy Markdown
Owner

As far as i see it should be ok for my repo .. possibly mainline uses different way if you want to upstream it.

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.

2 participants