Repository navigation
Conversation
The G18 render path gives the tiler a parameter buffer of 8 blocks (4 MiB) and has no runtime growth. When a scene needs more, the firmware posts event type 6 (TVB grow request, the M5 TvbGrowEventRecord layout) and the tiler waits for the host. Nothing answers, so the frame stalls until the 10 s job watchdog requests a recovery, and the client's submit fails with EIO. Zooming into Google Maps in Firefox or Chromium on the J873 (M6 Mac mini) hits this. Answering the request with a "not grown" device-control reply (opcode 8, as the M5 driver does at its maximum) does not help: the firmware consumes the record, but the tiler stays stalled. So overprovision, as render_policy::PB_BLOCKS already planned, and use that constant: 30 blocks (15 MiB) fill the 16 MiB graphics-pb VA window after the page list, metrics, scene scratch and discard page. A headless GLES test drawing N triangles of about 200 px into 2560x1440 used to stall at 60000 triangles. Now it renders 100000 in 7 ms and first stalls between 100000 and 150000. The image matches llvmpipe apart from single edge pixels, as it does for small scenes. Two clients submitting tiny frames in turn show no measurable change in submit time (2.63-2.75 s for 2x2000 frames, 2.70-2.86 s before). Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Contributor
Author
|
Superseded by #2242: 30 blocks were not enough for Google Maps, so the driver now grows the parameter buffer when the firmware asks. |
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.
On the J873 (M6 Mac mini), zooming into Google Maps in Firefox or Chromium stalls the GPU for 10 s, and the browser's submit then fails with EIO:
Event type 6 is the firmware's TVB grow request (the M5
TvbGrowEventRecordlayout: VM slot 3, buffer slot 0, counter, subpipe, halt count = recovery epoch). The G18 parameter buffer has 8 blocks (4 MiB) and no runtime growth, so nothing answers and the tiler waits until the watchdog recovers.I tried answering with a "not grown" device-control reply (opcode 8 on the primary control ring plus the 0x84/0x11 doorbell, as the M5 driver does at its maximum). The firmware consumes it (PB state +0x70 goes to 1), but the tiler stays stalled. Real growth, the M5
commit_growthpath, would mean writing the G18 block table and shared header, whose words are still marked [OPEN]. So this PR does whatrender_policy::PB_BLOCKSalready planned ("overprovision >=8; no PB growth"): it uses that constant and sets it to 30 blocks (15 MiB). That fills the 16 MiB graphics-pb window after the page list, metrics, scene scratch and discard page, with no address-map changes.Tests on the M6, with the J873 #10 stack (integration 0abc2f3 plus the J873g PRs), whose g18 code matches the integration tip in the three files touched here. The integration tip with this commit compiles.
Headless GLES test, N triangles of about 200 px into 2560x1440:
The rendered image matches llvmpipe except for 25 single pixels at triangle edges. Small scenes that never come close to overflowing show the same 28-49 such pixels.
Two GL clients submitting tiny frames in turn, so the job switches client VMs on most submits: 2x2000 frames take 2.63-2.75 s with 30 blocks and 2.70-2.86 s with 8. A single client takes 2.33 s in both cases.
The desktop (sway, three displays) runs normally on the 30-block module.
Workloads above about 3.75x the old limit still stall. Going further needs a wider graphics-pb window (Mesa reserves COMPACT_BIAS + [32 MiB, 2 GiB) for the kernel) or real growth.