Skip to content

WIP: drm_hwcomposer Add support for Arm Framebuffer Compression (AFBC) modifiers.

One needs to translate the Gralloc buffer flags for AFBC (eg MALI_GRALLOC_INTFMT_AFBC_BASIC) to the corresponding linux kernel drm modifiers. This gets passed to libdrm via drmModeAddFB2WithModifiers.

Changes from v1:-

  • Moved ConvertGrallocFormatToDrmModifiers() and IsDrmFormatRgb() from 'DrmGenericImporter' to 'HisiImporter' as suggested by Sean Paul
  • Check if the format is rgb and set AFBC_FORMAT_MOD_YTR only if any of the AFBC related Gralloc flags are set.

Signed-off-by: Ayan Kumar Halder

/-- Note for reviewer I was able to get this working for hikey960 with aosp/master for kernel 4.14. The libdrm headers need to be updated as the AFBC modifiers are missing in the aosp/master's external/libdrm. --/

Change-Id: I66abaa08d19ce88169cc40522b167dfe5efc7036

Edited by Ayan Kumar Halder

Merge request reports