replay: convert UBWC VisionBuf to nv12 with sde rotator #35575
+254
−1
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.
https://github.dev/commaai/agnos-kernel-sdm845/blob/0ba5f48f36d4e43c3b095a410279ed08050209fb/drivers/gpu/drm/msm/sde/sde_hw_rot.c#L583
decompress NV12 UBWC VisionBuf to NV12 with sde rotator hardware. This uses v4l2 to set the input frame buffer format (in this case, V4L2_PIX_FMT_NV12_UBWC) to the desired format (decompressed V4L2_PIX_FMT_NV12). A program will provide put_frame(vision_buf), with a pointer to an allocated visionbuf which needs to be decompressed which will then send the command to the hardware. Then call get_frame which will poll the rotator fd and return a pointer to the decompressed vision buffer.
Note that OUTPUT buffers are the inputs (nv12_ubwc) and CAPTURE buffers are the output (nv12).