On behalf of Gopise Yuan.
This is an update for the DRM framebuffer capture tool I used to share with the team. Some enhancement added.
Might be useful for debugging some display related issues.
Some special notes:
For L4.x, you can capture the RGB buffer without any problem. But, there’s no API for YUV (multi-plane) buffer. To capture YUV, need to apply “kernel_0001-drm-Add-getfb2-ioctl_L4.14.98.patch”.
For L5.x, mapping/capturing the internal buffer is not allowed by default due to security reason. A simple change in “0001-drm-enable-mapping-of-internal-object-for-debugging_L5.x.patch” can disable this guard.
To get more details on how to use it, use “-?” option:
DRM screen capture
DRM based screen capture program
Usage:
./drmfbcap [OP] [ARG]
[OP] OPeration (optional):
-v Show version.
-? Show help information.
-i Show information about target DRM device only (no capture).
-t Perform de-tile for tile format.
-d DRM device to open. [ARG] should contain the path to the device node. Default: '/dev/dri/card0'
-o Output folder. [ARG] should contain the path to the output folder. Default: '.'
-p Specific plane # to capture. [ARG] should contain the plane number. If no '-p' specified, capture all planes
Example:
./drmfbcap
Capture all planes on default DRM device.
./drmfbcap -d /dev/dri/controlD64
Capture all planes on '/dev/dri/controlD64' device.
./drmfbcap -p 44 -t -o /sdcard
Capture plane 44, do de-tile after capture and then output to /sdcard/.
Raw buffer capture will be done for each enabled/target plane and one file for each.
Captured file will be saved to './' if not specified.
--- By Gopise, 2022/08
Updated_2023_10_16:
continuous capture (repeat mode) support with this link:
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/DRM-screen-capture-tool/ta-p/1725363