drm/lima: power the MediaTek SMI larb on MT7623#191
Merged
Conversation
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>
Owner
|
As far as i see it should be ok for my repo .. possibly mainline uses different way if you want to upstream it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per commit message, I couldn't get GPU init to work on BPI R2. It was failing with this message:
This is the patch that resolved the issue, and allowed me to get
glxgearsspinning. 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!