OSDN Git Service

drm_hwcomposer: Add simplistic SetColorTransform implementation
authorRoman Kovalivskyi <roman.kovalivskyi@globallogic.com>
Wed, 11 Dec 2019 17:09:51 +0000 (19:09 +0200)
committerRoman Kovalivskyi <roman.kovalivskyi@globallogic.com>
Mon, 16 Dec 2019 15:54:03 +0000 (17:54 +0200)
commit12b91a35816c97c640f235fc0ac46e81402270a8
tree44bc9be3e73bb271025d36080fc9927135760737
parentbb37569e6647c92bcdee7a4be42bb5fb003ce0b7
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>
drmhwctwo.cpp
include/drmhwctwo.h