Skip to content

Add tested Mali/Bifrost gralloc3 support to minicap - #3

Merged
xaionaro-bot merged 6 commits into
AndroidGoLab:mainfrom
1514599514:feat/rk3588-minicap
Nov 3, 2026
Merged

xaionaro-bot merged 6 commits into
AndroidGoLab:mainfrom
1514599514:feat/rk3588-minicap

Conversation

@1514599514

Copy link
Copy Markdown
Contributor

All changes in this update were generated by GitHub Copilot. Since I lack the relevant Android low-level knowledge, I'm unable to review the code itself. However, I manually tested all use cases and parameter combinations in the minicap example's README.md, and they all worked successfully on my test device.

If there are any issues with the code, such as it not conforming to the project's conventions, feel free to close the PR directly.

Below is a summary generated by GitHub Copilot.

Summary

  • Add an allocator@3.0 descriptor-v30 allocation path for the tested device when the API 29 Qualcomm allocator@2.0 service is unavailable.
  • Validate the observed Mali/Bifrost native handle and linear RGBA plane layout before reading pixels from the DMA-BUF.
  • Preserve the existing Qualcomm and Pixel graphics paths; reject unsupported or compressed layouts rather than interpreting them as RGBA.
  • Document the supported device ABI and minicap usage.

Device and architecture

  • Tested on a device reporting ro.board.platform=rk3588, Android 10 (API 29).
  • Built and run as a 64-bit ARM Android executable (GOOS=linux GOARCH=arm64 CGO_ENABLED=0).
  • The device exposes allocator/mapper HIDL 3.0 with Bifrost graphics libraries; the tested allocation is a CPU-readable, linear RGBA DMA-BUF.
  • The device's model/build properties do not consistently identify it as an RK3588 device. Support is therefore limited to the allocator ABI verified on this device and is not a claim of compatibility with all RK3588 or Mali devices.

Validation

  • Cross-compiled the minicap package tests for ARM64 and ran them on the device.
  • Verified display info, capture test, and JPEG screenshot modes on-device.
  • Verified continuous minicap socket delivery, JPEG frame decoding, and client reconnection.
  • Verified raw RGBA output contains fixed-size frames.
  • go vet, formatting checks, and git diff --check passed.

1514599514 and others added 6 commits November 3, 2026 11:14
Add descriptor-aware allocator@3.0 requests and validated linear RGBA dma-buf readback for the tested device. Fall back from an unavailable API 29 Qualcomm allocator and document the supported minicap capture modes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Test Plan:
- go test ./gralloc -count=1 (pass)
- go vet ./gralloc (pass)
- Disabled fallback and partial cleanup separately; focused tests failed as expected.
- go test -race ./gralloc -count=1: unavailable, ThreadSanitizer unsupported VMA range.
@xaionaro-bot
xaionaro-bot merged commit fa22e81 into AndroidGoLab:main Nov 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants