Repository navigation
media: apple: scaler: keep CAPTURE at the OUTPUT size - #2971
RyanTheTide wants to merge 1 commit into
Conversation
An odd RGB OUTPUT size and a 4:2:0 CAPTURE request round the CAPTURE dimensions up. The format ioctls succeed, but the job builder rejects the resulting unequal-size pair. Keep the active OUTPUT dimensions for CAPTURE and use the existing RGB fallback if the requested format cannot represent them. Preserve compatible format requests and existing OUTPUT negotiation. Signed-off-by: Ryan Murray <[email protected]>
RyanTheTide
left a comment
There was a problem hiding this comment.
Review at 395db97. The CAPTURE geometry now comes from the active OUTPUT format and remains unchanged when the requested CAPTURE subsampling cannot fit. Both CAPTURE ioctl paths use the RGB fallback, and setting OUTPUT revalidates CAPTURE under the existing queue-busy checks. The 7/10 to 10/10 host result covers both dimensions and the compatible controls. Please include a CAPTURE format set first, followed by an odd OUTPUT set, then G_FMT and one streamed buffer in the device row. This exercises the dependent-format update as well as direct CAPTURE negotiation.
|
J413 MacBook Air stock row on
The odd-sized RGB, even-sized NV12M and even-sized P010 controls passed (3/3). There were zero new kernel errors or SELinux AVCs. Fleet85 was still running and saved, with an empty next entry, SELinux Enforcing and zero failed units. The signed |
…PUT size Folds #2971 into this PR unchanged. Signed-off-by: Ryan Murray <[email protected]>
|
Folded into #2804, which now carries this PR's commits unchanged (merge commit); review continues there. |
Problem
An odd RGB OUTPUT size can be paired with a 4:2:0 CAPTURE format that rounds one or both dimensions up. The format ioctls succeed, but the same-size hardware job builder rejects the pair.
Change
Keep the active OUTPUT dimensions. Use the existing RGB fallback when the requested CAPTURE format cannot represent those dimensions. TRY_FMT, CAPTURE S_FMT and CAPTURE revalidation after OUTPUT S_FMT use the same helper.
Testing
Stock J413 fleet85 reproduced four format failures on the 13.5 stub. All three compatible controls passed, with zero new kernel errors, SELinux AVCs or failed units. J413 stock row
Format and build results
The native and emulated ARM64 host harnesses execute the scaler format callbacks and the V4L2 multiplanar fill helper. They use simulated format metadata and queue state. The candidate's CAPTURE-first sequence returns 641 × 481 ARGB32, and the four compatible state controls agree. Strict checkpatch reported zero errors, warnings or checks.
Still to run
Run the signed-candidate ioctls and stream a CAPTURE-first frame on the default command line. Run the stock and candidate controls on J473 and other available Macs with the scaler. Check kernel errors, AVCs and failed units.