Commit graph

1020 commits

Author SHA1 Message Date
Leon Scroggins III
5f78f65e8f Test that R_8 can be allocated if it's supported
Bug: 209458105
Test: atest VtsHalGraphicsMapperV4_0TargetTest (this)
Change-Id: I927393bf9e4186d400e8b7cc0758095ec00ef13f
2022-01-19 16:26:35 -05:00
TreeHugger Robot
eac016a771 Merge "ASSERT error check in brightness test" 2022-01-12 21:41:54 +00:00
ramindani
b3bdf0535c ASSERT error check in brightness test
Without ASSERT the next call to take the first element will crash the instrumentation for the tests.

BUG: 210151839
Test: atest VtsHalGraphicsComposer3_TargetTest
Change-Id: I2c78b9130661e543e62138c064ab15dd79180920
2022-01-12 18:31:50 +00:00
TreeHugger Robot
d88b967144 Merge "composer: deflake Test_expectedPresentTime" 2022-01-12 18:30:28 +00:00
Ady Abraham
5429444b46 Merge changes from topic "hwc_float_color"
* changes:
  composer: Color.aidl should use floats
  composer: remove FloatColor
2022-01-12 00:48:54 +00:00
Leon Scroggins
780f1ba454 Merge "Add LayerCommand.blockingRegion" 2022-01-11 21:28:57 +00:00
Ady Abraham
1bee7abe60 composer: Color.aidl should use floats
Color is represented as a float [0.0 - 1.0] in the upper part of
the stack, so make composer3 interface consistent.

Bug: 207139550
Test: VTS
Change-Id: Ic14288b5c87ff5cccfc9a0756d2630b8715759f7
2022-01-10 18:29:17 -08:00
Ady Abraham
4596369b26 composer: remove FloatColor
Currently not used.

Bug: 207139550
Test: VTS
Change-Id: I190382a7e72bd07b84a44f22f7b4b8b39b961355
2022-01-10 18:29:16 -08:00
Ady Abraham
df084f35fc composer: deflake Test_expectedPresentTime
Test_expectedPresentTime might fail due to scheduling delays.
To avoid that, we test that the actual presentation didn't
happen too early, but we allow for a late presentation.

Bug: 198186194
Test: VTS
Change-Id: I9be4bfe5a848443e69ef7b62ffb3dae675a9b81f
2022-01-11 00:39:00 +00:00
TreeHugger Robot
e57e096206 Merge "Cleanup to composer apis for HDR:" 2022-01-11 00:36:42 +00:00
Alec Mouri
bc1c743832 Cleanup to composer apis for HDR:
1. Remove the setDisplayBrightness method, as it's been moved to a
display command
2. Rename the WhitePointNits stable stuct to Luminance, since it's a
more general descriptor.

Bug: 210151839
Test: builds
Change-Id: Ic948dce737ce718772100b0e976ec93069d5e8e1
2022-01-10 09:46:56 -08:00
Alec Mouri
2bee6043d4 Merge "Adjustments to composer apis for HDR:" 2022-01-07 22:44:50 +00:00
Leon Scroggins III
536f04e354 Add LayerCommand.blockingRegion
This hint tells the HWC that it may use a blocking feature to skip a
portion of the layer's buffer.

Bug: 212736475
Test: TODO (b/213361853)
Change-Id: Ib0fa41e56196feeff201637d5599830d2565da2b
2022-01-07 14:48:51 -05: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