commit | cc5fca4f9410b39c64900ea627841dfd9ea0dedb | [log] [tgz] |
---|---|---|
author | Ayan Kumar Halder <ayan.halder@arm.com> | Mon Jan 14 12:47:12 2019 +0000 |
committer | Ayan kumar halder <ayan.halder@arm.com> | Thu Jan 31 19:36:14 2019 +0000 |
tree | 2ee8dfb7ebc6baf91b2ba84d0fc7fc190e4c3f6f | |
parent | dafaabd0509a501632d7bc2e5dc5412e52818281 [diff] |
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. Changes from v2:- - Changed ConvertGrallocFormatToDrmModifiers() and IsDrmFormatRgb() from 'public' to 'private' (suggested by Sean Paul) Changes from v3:- - Reordered the members of 'class HisiImporter'. Functions should go above member variables. (suggested by Sean Paul) Changes from v4:- - Rebased and some style changes (as suggested by gitlab-ci-checkcommit.sh) Signed-off-by: Ayan Kumar Halder <ayan.halder@arm.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> /-- 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
Patches to drm_hwcomposer are very much welcome, we really want this to be the universal HW composer implementation for Android and similar platforms So please bring on porting patches, bugfixes, improvements for documentation and new features.
A short list of contribution guidelines:
Submit changes via gitlab merge requests on gitlab.freedesktop.org
drm_hwcomposer is Apache 2.0 Licensed and we require contributions to follow the developer's certificate of origin: http://developercertificate.org/
When submitting new code please follow the naming conventions documented in the generated documentation. Also please make full use of all the helpers and convenience macros provided by drm_hwcomposer. The below command can help you with formatting of your patches:
`git diff | clang-format-diff-5.0 -p 1 -style=file`
Hardware specific changes should be tested on relevant platforms before committing.
If you need inspiration, please checkout our TODO issues
Happy hacking!