Skip to content

drm_hwcomposer: add importer using IMapper metadata

Dennis Tsiang requested to merge dennis.tsiang/drm-hwcomposer:main into main
  • Add custom drm hwcomposer metadata types

Add a custom aidl interface that implements the plane fds metadata type for drm_hwcomposer. Also adds new platformgrallocmetadatatypes[.h|.cpp] files that contains the encode/decode functions for the new plane fds metadata type. These files can be shared between the drm_hwcomposer and Gralloc implementations providing support for the new metadata.

  • Create generic importer for Gralloc 4 API

Create class VendorGraphicBufferMapper which is intended to augment GraphicBufferMapper by adding support for getting vendor plane fd vendor metadata. This is required because GraphicBufferMapper does not provide access to vendor metadata types and it is not possible to inherit from the Singleton derived GraphicBufferMapper. Add alternative to GraphicBufferMapper's importBuffer in VendorGraphicBufferMapper that imports without validating the buffer size.

  • Use VendorMapper importbuffer over GraphicBufferMapper

Avoid using GraphicBufferMapper just to duplicate the buffer handle as this will re-validate the properties received from IMapper using IMapper which is unnecessary and requires the pixel stride, which cannot be obtained via standard IMapper metadata. Instead, use the VendorGraphicBufferMapper to do this.

Tested locally on Hikey960 for boot to home screen on Android 11.

Signed-off-by: Dennis Tsiang Signed-off-by: Ben Davis Signed-off-by; Paul Howgego Signed-off-by: Rosen Zhelev Signed-off-by: Matteo Franchin Change-Id: I673e40672473f6e8ca054a9b6fa3de26245f433d

Merge request reports