enable ASYNC_COMMIT on planes - #147
henkwiedig wants to merge 1 commit into
Conversation
PR Summary by QodoAdd opt-in asynchronous DRM plane commits
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1. Async state survives shutdown
|
|
|
||
| ////////////////////////////////////////////// DRM CLEANUP | ||
| restore_planes_zpos(drm_fd, output_list); | ||
| restore_planes_zpos(drm_fd, output_list, async_commit_planes); |
There was a problem hiding this comment.
1. Async state survives shutdown 🐞 Bug ≡ Correctness
ASYNC_COMMIT is documented as persistent, but shutdown passes async_commit_planes into both restore commits, reasserting 1 instead of restoring the planes' prior values. After one enabled run exits, a later default run skips the setter and can therefore keep performing asynchronous, tearing plane updates despite --async-commit-planes being absent.
Agent Prompt
## Issue description
`ASYNC_COMMIT` is persistent plane state, but cleanup reasserts the enabled value and leaves it active for subsequent DRM users and later runs.
## Issue Context
Capture each selected plane's original `ASYNC_COMMIT` value before changing it. Apply the requested runtime value explicitly and restore the captured values during shutdown rather than passing the runtime enable flag through the z-position restore path.
## Fix Focus Areas
- src/drm.c[955-968]
- src/drm.c[973-990]
- src/main.cpp[2018-2033]
- src/drm.h[135-149]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| if (async_commit && drm_object_has_property(plane, "ASYNC_COMMIT")) | ||
| set_drm_object_property(req, plane, "ASYNC_COMMIT", 1); |
There was a problem hiding this comment.
2. Async setter failure ignored 🐞 Bug ☼ Reliability
modeset_atomic_prepare_commit() ignores the result of adding ASYNC_COMMIT to the atomic request and returns success even when that addition fails. Callers then report preparation as successful and proceed without the requested behavior or encounter a less-specific commit failure.
Agent Prompt
## Issue description
Failure to add `ASYNC_COMMIT` to the atomic request is discarded, so preparation can falsely report success.
## Issue Context
The required setters in the same function return immediately on failure. Preserve the optional behavior for an absent property, but once the property has been found, propagate or clearly handle a failed `set_drm_object_property()` call.
## Fix Focus Areas
- src/drm.c[962-965]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| __OnArgument("--async-commit-planes") { | ||
| async_commit_planes = true; | ||
| continue; | ||
| } |
There was a problem hiding this comment.
3. Packaged option documentation missing 🐞 Bug ⚙ Maintainability
The new --async-commit-planes switch is parsed and shown in built-in help but is absent from the maintained Debian manpage. Users of the packaged manual cannot discover the latency/tearing option or its vendor-kernel restriction there.
Agent Prompt
## Issue description
The new command-line option is missing from the packaged Debian manual.
## Issue Context
Mirror the built-in help text, including the Rockchip BSP requirement, silent unsupported-driver behavior, latency benefit, and tearing tradeoff.
## Fix Focus Areas
- debian/manpage.md[80-90]
- src/main.cpp[1300-1303]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
The MR enables rockchip's vendor specific ASYNC_COMMIT on the drm planes.
Should improve latency a bit.