drm_hwcomposer: Add simplistic SetColorTransform implementation

VTS tests for SET_COLOR_TRANSFORM fails for now since
SetColorTransform is marked as unsupported function. this commit tries
to address this issue. We can't make complete implementation of those
features for our platform for now, so we'd just save arguments for
future use and force client composition if any color transformation is
requested. This is perfectly acceptable way to pass VTS testcase for
SET_COLOR_TRANSFORM.

Commit da5839cf9258 ("drm_hwcomposer: Add support for GetColorModes &
SetCursorPosition") implements GetColorModes and SetCursorPosition
simply by adding fields that store this values for future
uses. Therefore we assume that it is okay to use this approach to at
least support interface part.

Please note that if transform hint is identity then no
transformation should be applied. If hint is arbitrary matrix then
given matrix should be applier after composition, though for now we'd
just force client composition instead. This behavior is required by
HAL interface as stated in
hardware/interfaces/graphics/composer/2.1/IComposerClient.hal, line
738 from repository
https://android.googlesource.com/platform/hardware/interfaces, tag
android-10.0.0_r14

Please note that color transform matrix argument is an array that has
16 elements by contract, as it is 4x4 matrix. This is why
MATRIX_SIZE has such value.

Signed-off-by: Roman Kovalivskyi <roman.kovalivskyi@globallogic.com>
2 files changed
tree: 44bc9be3e73bb271025d36080fc9927135760737
  1. compositor/
  2. drm/
  3. include/
  4. platform/
  5. tests/
  6. utils/
  7. .clang-format
  8. .gitlab-ci-checkcommit.sh
  9. .gitlab-ci.yml
  10. Android.bp
  11. drmhwctwo.cpp
  12. MODULE_LICENSE_APACHE2
  13. NOTICE
  14. README.md
README.md

drm_hwcomposer

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!