Repository navigation
Conversation
asahi_g18_fence_error() walks a dma_fence_chain with dma_fence_chain_walk(), which unlinks the earlier points that have signalled. A job's inputs have all signalled when it runs, so of a timeline only the head point's own fence is checked, and an error on an earlier point is not seen. The comment said every fence was checked. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Three follow-ups to the asynchronous submit path (aurora-silicon#2679): - A failed job is reported at most once a second, with the number of failures not reported in between. A client that submits failing jobs in a loop could otherwise flood the log; the output fence and the queue's next submit still carry every error. - The device holds at most 256 accepted jobs waiting to run, over all queues and files. Each queue was bounded at 32, but a file can open any number of queues. A submit waits for room before it publishes anything, so a signal restarts the ioctl as the existing waits do. The cap is soft: submits that wait together can each add one job. - Jobs run on the device's own unbound workqueue instead of system_unbound. When G18DrmGpu is dropped, the queue is taken out of the job state and destroyed, which waits for the worker to return, so no job work item outlives the device. A submit after that is refused with -ENODEV. On the J873 this happens only on the probe error path today: once the firmware session starts, the module is pinned until reboot and the platform driver has no bind attributes. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
sithglan
force-pushed
the
thomas/g18-async-followup
branch
from
November 22, 2026 18:53
21d1574 to
6252dbc
Compare
sithglan
marked this pull request as ready for review
November 22, 2026 18:55
Contributor
|
Review at 6252dbc. Thanks, this addresses the #2679 points cleanly. The teardown ordering looks right to me: the worker holds only
The comment change in |
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.
Follow-up to #2679: the four points from the review there (comment).
Changes
g18/sync_input.c).dma_fence_chain_walk()unlinks the earlier points of a timeline once they have signalled. A job's inputs have all signalled when it runs, so of a timeline only the head point's own fence is checked. The comment now says that instead of "each fence is checked".fault_log_ratelimitpattern ingpu.rs. The output fence and the queue's next submit still carry every error.DEVICE_DEPTH). The per-queue cap stays 32.JobQueue::wait_room()waits interruptibly before the submit publishes anything, next to the existing per-queue wait, so a signal restarts the ioctl. The cap is soft: submits that wait together can each still add one job.aurora_g18_jobs) instead ofsystem_unbound. WhenG18DrmGpuis dropped, the queue is taken out of the job state and destroyed, which waits for the worker to return. So no work item of the module can still be running whenG18DrmGpugoes away. A submit after that gets-ENODEV. The drop never runs on the worker itself: a job holds the runtime, the VM and the queue's error flag, but notG18DrmGpu, and a queue waits for its last job before it is released.G18DrmGpu::new(). Once the firmware session starts, the driver pins its own module until reboot (retain.c), and the G18 platform driver suppresses bind attributes. So neitherrmmodnorunbindcan reach this path on hardware; see the row below. The drain covers that error path and any later removal support.Testing
arm64 build with
LLVM=-22:drivers/gpu/drm/asahicompiles with no new warnings. The 20 dead-code warnings are all in other files and are there at the base too.checkpatch.pl --strict: clean on both commits.CI
host-tests: pass. No host test coversg18/drm.rs.M6 (J873g) row. The M6 desktop GPU module (the failfast state) was run A/B, with and without the runtime commit of this PR. It applied unchanged; the comment commit has nothing to apply to there, because that tree predates
asahi_g18_fence_error(). Mesa is the system build with mesa#601, so GL queues are async (glFlushreturns in 0.0 ms). The test tool isg18burst, a raw-ioctl test.G18 job failedlinesG18: 39 more failed jobs not reportedwith the 41stGL error 0.rmmod aurorais refused, because the module is pinned for the firmware session./sys/bus/platform/drivers/aurora-g18/unbinddoes not exist. That is expected on this driver, so the drain is not exercised on hardware.Assisted-by: LLM (Claude:Opus 5.5)