Repository navigation
Check linear scan-out as the reference does (P-104) - #125
Merged
Merged
Conversation
Upstream's 102dd69 (drm-cxx#364) made two choices drmkit's earlier fix for the same finding (P-48) did not. A plane without IN_FORMATS scanned out any modifier its bare list had a format for; the reference reads the bare list as linear only. A probed plane already gets a linear-only table, so this changes only capabilities built by hand. The canvas reservation accepted a plane that could host a canvas in any format; the reference, once the canvas exists, asks that the plane take the canvas's own format linear. canvas_reservation now takes the canvas's fourcc and checks it with scans_out_linear. The cursor's legacy path stays limited to a cursor plane that takes ARGB8888 linear, the format the legacy ioctls hand the kernel. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
jwinarske
force-pushed
the
fix/scans-out-linear-parity
branch
from
October 20, 2026 19:14
b006309 to
2ee014f
Compare
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.
This is part of moving the parity baseline to drm-cxx
2a050f5. Upstream's102dd69(drm-cxx#364) made two choices that drmkit's earlier fix for the same finding (P-48) did not.IN_FORMATS:scans_outaccepted any modifier for a format in the bare list. The reference reads the bare list as linear only, so INVALID is also accepted and AFBC is not. A probed plane already gets a linear-only table, so this changes only capabilities built by hand. Three test fixtures that built anIN_FORMATStable without settinghas_format_modifiersnow set it.plane_hosts_canvasasks, once the canvas exists, that the plane take the canvas's own format linear.canvas_reservationnow takes the canvas's fourcc and checks it withscans_out_linear.Kept, and recorded in P-104: the cursor takes the legacy path only on a cursor plane that takes
ARGB8888linear, the format the legacy ioctls hand the kernel. The reference takes it on any cursor format.Tests:
scans_out_reads_the_layout_from_in_formatsnow carries upstream'sScansOutWithoutInFormatsIsLinearOnly.overflow_reserves_only_a_plane_that_takes_the_canvas_as_it_is. It fails with the old host check.Checks: clippy over the workspace with all features, workspace tests, the scene, planes, cursor and CSD tests on vkms, and rustdoc all pass. semver-checks reports no update needed.