Commit graph

1008 commits

Author SHA1 Message Date
Alec Mouri
2bee6043d4 Merge "Adjustments to composer apis for HDR:" 2022-01-07 22:44:50 +00:00
Leon Scroggins
b9d017c22f Merge "Add DisplayCapability::DISPLAY_DECORATION" 2022-01-07 17:11:47 +00:00
Alec Mouri
60564e18c8 Adjustments to composer apis for HDR:
1. Add setDisplayBrightness as a display command, so that it may be
set atomically with composition updates for that display.
2. Adjust tests to set display brightness using display commands.

The setDisplayBrightness api on IComposer should be deprecated. It will
be removed in a follow-up patch.

Bug: 210151839
Test: builds

Change-Id: I2e4348e1d7f799d1744390afbb9bd206054eb933
2022-01-06 14:06:30 -08:00
Leon Scroggins III
830a0b445e Add DisplayCapability::DISPLAY_DECORATION
Bug: 193170859
Test: manual
Test: TODO (b/212697197)
Change-Id: I5e5efe671f0b3d724bafeff93e2d97007cb167ab
2021-12-30 12:47:13 -05:00
Leon Scroggins
3519a109bd Merge "Reland "Update documentation for DISPLAY_DECORATION"" 2021-12-29 13:01:54 +00:00
Ram Indani
4430c6ce25 Merge "composer: fix null pointer dereference" 2021-12-28 16:52:57 +00:00
Leon Scroggins
2efab6cd3c Reland "Update documentation for DISPLAY_DECORATION"
The first time this topic landed, it resulted in b/212402133. We avoid
running into this bug with Ib11d46439db57b90486bad07dd90f2cf0822182a.

Remove references to 8 bit alpha.

Original commit message:

After some discussion, we've decided to always set the ScreenDecorations
to DISPLAY_DECORATION. HWC can decide, based on the format, whether to
truly treat it as DISPLAY_DECORATION, or to change to DEVICE
composition.

Update the documentation to reflect this change.

See also I1da3199bacf5877e88876249c60c0a33fcd44c1e.

Bug: 193170859
Test: NA

Change-Id: Iaf5385c38f6827e07b91a9a0a8769fb7a125e847
2021-12-28 11:30:25 -05:00
Ady Abraham
435fd2fda1 composer: fix null pointer dereference
The test process was crashing on null pointer instead of exiting
successfully, so fixing the null pointer error.

Test: VTS
Change-Id: I1d6988d25ed58c159adc49d43d36e4b3f0ffa289
2021-12-23 16:23:26 -08:00
Ady Abraham
11840523cd Merge "composer: remove translate-ndk" 2021-12-23 23:58:57 +00:00
Leon Scroggins
80b5caec3e Merge "Revert "Update documentation for DISPLAY_DECORATION"" 2021-12-23 21:55:09 +00:00
Ady Abraham
f825cd7768 Merge changes from topic "b_208856704"
* changes:
  composer: cleanup CommandWriterBase and CommandReaderBase part 2
  composer: make PresentOrValidate.Result consistent with hidl
2021-12-23 21:27:08 +00:00
TreeHugger Robot
33e36ef1dc Merge "composer: rename ClockMonotonicTimestamp.timestamp" 2021-12-23 21:07:40 +00:00
Leon Scroggins
fa7e058b5e Revert "Update documentation for DISPLAY_DECORATION"
Revert "Add/plumb SurfaceControl.DISPLAY_DECORATION"

Revert "Add eLayerIsDisplayDecoration flag"

Revert submission 16511727-wm_DISPLAY_DECORATION

Reason for revert: b/211835607
Reverted Changes:
I1da3199ba:Allow changing composition from DISPLAY_DECORATION...
I1fae74b36:Update documentation for DISPLAY_DECORATION
I1da03a88f:Add eLayerIsDisplayDecoration flag
I7f22dfd03:Add/plumb SurfaceControl.DISPLAY_DECORATION

Change-Id: I7238bcc96325873ec7dbdd42894192c48e7cf92e
2021-12-23 15:28:46 +00:00
Ady Abraham
c4fd63353d composer: remove translate-ndk
- No one is using the translate functions, so removing.
 - Rename the static_assert portion to Hidl2AidlAsserts

Test: build
Change-Id: I42abc37953e1d927a3bcf5f60f56acf99fde6bf5
2021-12-22 21:59:35 -08:00
Ady Abraham
46219f5731 composer: cleanup CommandWriterBase and CommandReaderBase part 2
Bug: 208856704
Test: VTS
Change-Id: I30f4cfef66a1c833142b4645f69e8ad9fbf0de8e
2021-12-22 21:58:57 -08:00
Ady Abraham
b9b5df3ce5 composer: make PresentOrValidate.Result consistent with hidl
HIDL expects that Presented will be 1 and Validated witll be 0.
Even though we map the enum values of PresentOrValidate.Result
to the correct value, this CL makes the interface consistent with
the HIDL so that we can directly use the enum value.

Bug: 208856704
Test: VTS
Change-Id: I9fb2421e32c2288c5495422eda6764f6102337f0
2021-12-22 21:58:57 -08:00
Ady Abraham
8d65de5874 composer: rename ClockMonotonicTimestamp.timestamp
Rename ClockMonotonicTimestamp.timestamp to
ClockMonotonicTimestamp.timestampNanos to improve readability.

Fixes: 211801233
Test: build
Change-Id: Ia71525fd9ccb77d871857f60dac29ac9198c0258
2021-12-22 16:54:14 -08:00
Ady Abraham
f98cd3a9fe Merge "Remove GenericMetadata from composer3" 2021-12-23 00:28:11 +00:00
TreeHugger Robot
e00550775b Merge "composer: release fence can be null" 2021-12-23 00:17:38 +00:00
Ady Abraham
5b2858b709 Merge changes from topics "b_208879711", "hwc_present_time"
* changes:
  composer: DisplayCommand.colorTransform is just a matrix
  composer: pass expetcedPresentTime
2021-12-22 23:14:05 +00:00
Ady Abraham
dc6dd69948 composer: release fence can be null
Add @nullable to the releaseFence in IComposerClient.setReadbackBuffer
as it can be null, if the buffer is ready to be consumed.

Bug: 210166943
Test: VTS
Change-Id: Ic556ceabd22ba8acddf37ca7d9a6d14d41697c5b
2021-12-22 22:52:58 +00:00
Ady Abraham
654a3287ae Remove GenericMetadata from composer3
There are no current users for GenericMetadata, so removing
from composer 3.

Bug: 209691612
Test: VTS
Change-Id: I729a3646d9684c78454708fd15f1571aa405e9bb
2021-12-21 23:09:02 +00:00
Ady Abraham
8de9885800 composer: DisplayCommand.colorTransform is just a matrix
Remove the hint from DisplayCommand.colorTransform as currently
we only use ColorTransform::IDENTITY and ColorTransform::ARBITRARY_MATRIX,
which both can be expressed using a matrix.

Bug: 208879711
Test: VTS
Change-Id: Ibb24593e3d0af5afdc8f3f79de2fc22eeccfcea8
2021-12-21 14:04:33 -08:00
Leon Scroggins III
64803940e6 Update documentation for DISPLAY_DECORATION
After some discussion, we've decided to always set the ScreenDecorations
to DISPLAY_DECORATION. HWC can decide, based on the format, whether to
truly treat it as DISPLAY_DECORATION, or to change to DEVICE
composition.

Update the documentation to reflect this change.

See also I1da3199bacf5877e88876249c60c0a33fcd44c1e.

Bug: 193170859
Test: NA
Change-Id: I1fae74b360d1b9d79fc4afeab6f71089d4c8b7e5
2021-12-20 23:08:13 -05:00
Ady Abraham
72c5b503e5 composer: pass expetcedPresentTime
Add expectedPresentTime as an optional field to DisplayCommand.

Test: VTS
Bug: 198186194
Change-Id: I1203422b5d052508ca42a80da5d252c106efc5ee
2021-12-20 19:30:11 -08:00
Treehugger Robot
02878aa564 Merge "fix VtsHalGraphicsComposerV2_2TargetTest timeout failed" am: 81c9e603ea am: f864ffeb60 am: f5d2e9f8b8 am: 9506712ee3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1921757

Change-Id: I91028f31c1f571e31ba47695c4401738a3625b87
2021-12-16 23:33:15 +00:00
Ady Abraham
898e6d6aad Merge "composer: cleanup CommandWriterBase and CommandReaderBase" 2021-12-16 19:38:54 +00:00
Kui1 Wu
ada2850cfb fix VtsHalGraphicsComposerV2_2TargetTest timeout failed
run VtsHalGraphicsComposerV2_2TargetTest will timeout failed
when there is dual displays. use `std::unordered_set` Display type,
`std::vector<Display>(mDisplays.begin(), mDisplays.end())` as
getDisplays return value, mDisplays elements order may not be
same as the order of hotplug events during boot matters.
We should store `mDisplays` as `std::vector`, since the order of
hotplug events during boot matters in determining the primary display.

Bug: 209409863
Test: run vts -m VtsHalGraphicsComposerV2_2TargetTest

Signed-off-by: Kui1 Wu <wukui1@xiaomi.com>
Change-Id: I628ad593640f28fb8a916822a91ac2c578cc299d
2021-12-16 08:18:15 +00:00
Ady Abraham
91c9d1a821 composer: cleanup CommandWriterBase and CommandReaderBase
These classes are used by both the client and the service, which
makes them confusing. This CL splits the logic for the client
and the service.

Bug: 208856704
Test: VTS
Change-Id: I6fa89858afeee9113ea8c810261d734163a95ec9
2021-12-15 18:18:54 -08:00
Ram Indani
58ffd3d541 Merge "Set the thread pool count to 4 for vts3 tests. Thread priority is from https://source.corp.google.com/android/frameworks/native/services/surfaceflinger/main_surfaceflinger.cpp;rcl=e9cdd276a89d512137f22650da0c45ee4b28bd66;l=97" 2021-12-15 16:27:15 +00:00
Leon Scroggins
a97bfe621b Merge "Add DISPLAY_DECORATION to HWC3 HAL" 2021-12-14 18:03:53 +00:00
ramindani
3d18f92380 Store the GraphicBuffer allocated so that SP pointer is not deallocated when this function exists to verify values in other related fuctions.
Test: atest VtsHalGraphicsComposer3_TargetTest
BUG: 199413815
Change-Id: I7e44311cf7a11220f80f41cef503b7b82b443ece
2021-12-14 01:49:19 +00:00
Ady Abraham
a80531fdc0 composer3: fix documentation to match aidl style
Bug: 201008710
Test: N/A
Change-Id: Ie7030e4e0ccf817b8dfc6bf7f91fbd1bd4d18928
2021-12-13 23:27:39 +00:00
Ady Abraham
6679baf603 composer: add DisplayCapability::SUSPEND
Also remove the redundant APIs getDisplayBrightnessSupport
and getDozeSupport.

Bug: 209889459
Test: VTS
Change-Id: Id7e4da62fdcf65b279656a9f115e60b6145e8b5d
2021-12-13 23:27:12 +00:00
Ady Abraham
c26756d5ee composer: move LayerCommand to be part of DisplayCommand
This CL also includes a few miscellaneous changes:
 - Remove ..composer3.command namespace
   (so all commands are in composer3)
 - Minor documentation update
 - Minor name changes

Bug: 201008710
Test: VTS
Change-Id: I3fc24392d6c019c39e4d7df735abacc2c793c4f9
2021-12-13 23:09:53 +00:00
ramindani
beea10e8e6 Set the thread pool count to 4 for vts3 tests.
Thread priority is from
https://source.corp.google.com/android/frameworks/native/services/surfaceflinger/main_surfaceflinger.cpp;rcl=e9cdd276a89d512137f22650da0c45ee4b28bd66;l=97

Test: atest VtsHalGraphicsComposer3_TargetTest
BUG: 207005096
Change-Id: Ic37b454c4ae3990fd8cb38fcdd50747083b2528c
2021-12-13 15:14:36 +08:00
Alec Mouri
29d2a0f733 Add white point plumbing into command buffer
Bug: 200310158
Test: builds, boots
Change-Id: I67cadb441b24663346452850a86e3d9151868749
2021-12-09 13:29:34 -08:00
Ady Abraham
7d4d3dace1 Merge "Add Parcelable AidlComposer commands" 2021-12-08 05:03:16 +00:00
Ady Abraham
3192f3dfdb Add Parcelable AidlComposer commands
Change the command interface to use parcelables instead of FMQ.

Bug: 201008710
Test: VTS
Change-Id: Iac67330eb34a5bcf253580e8109a67bd90483d85
2021-12-08 00:19:29 +00:00
Leon Scroggins
c2bd02947a Merge "Add AIDL PixelFormat::R_8" 2021-12-07 15:13:20 +00:00
Leon Scroggins III
c0ae66a05e Add AIDL PixelFormat::R_8
Bug: 193170859
Bug: 209497983
Test: build and boot
Test: TODO (b/209458105)
Change-Id: I6f6b7f22e76609151a413ca6a6dbf55bd91911dd
2021-12-06 18:39:36 -05:00
Ram Indani
3944930291 Merge "Readback tests from VtsHalGraphicsComposerV2_2TargetTest VTS 2.2" 2021-12-06 21:13:12 +00:00
ramindani
b27f33b4b4 Readback tests from VtsHalGraphicsComposerV2_2TargetTest VTS 2.2
Tests are from https://source.corp.google.com/android/hardware/interfaces/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp;l=431

Test: atest VtsHalGraphicsComposer3_TargetTest
BUG: 202766745
Change-Id: I591a7ecfc8bb6ec5e9d764e93a9d43f91b23ea74
2021-12-06 16:57:06 +00:00
Leon Scroggins III
437dee048f Add DISPLAY_DECORATION to HWC3 HAL
Bug: 193170859
Test: TODO
Change-Id: I90543850d57323be485a0fa8562f4e965aed28ab
2021-12-06 10:00:03 -05:00
Ady Abraham
4aa4ead85d composer: vts: fix display type
display is 64bit and not 32bit

Test: build
Bug: 202766745
Change-Id: I0e0d53222b306fe303867a105868e85e072c0299
2021-12-03 16:07:54 -08:00
ramindani
bab8ba921f Readback tests from VTS 2.2
Tests are from https://source.corp.google.com/android/hardware/interfaces/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp;rcl=4796867049599ae1618d63cb93a38b269687164b;l=52

Test: atest VtsHalGraphicsComposer3_TargetTest
BUG: 202766745

Change-Id: I495819c168429873dc88decb20f398569c1a8128
2021-12-03 01:40:23 +00:00
ramindani
dcfe3a8b96 AIDL vts 2.1 command tests
Test: atest VtsHalGraphicsComposer3_TargetTest
BUG: 199413815
Change-Id: I4a49ae5e6110e45e96cd595e916a84d42470a93b
2021-12-02 17:07:12 +00:00
Ram Indani
8a2c44fa6c Merge "AIDL vts non reader writer 2.1 tests" 2021-12-02 16:48:55 +00:00
ramindani
2740baca70 AIDL vts non reader writer 2.1 tests
Test: atest VtsHalGraphicsComposer3_TargetTest
BUG: 199413815
Change-Id: Ib801b248c83111fafc2c239e1edecd859067c62e
2021-12-01 00:38:23 +00:00
ramindani
770d70876a AIDL vts 2.1 test differences in the existing tests.
Test: atest VtsHalGraphicsComposer3_TargetTest
BUG: 199413815
Change-Id: I4b3c6eadea9d17eabb9c06d098b654cd4d93267b
2021-11-30 21:50:01 +00:00