Commit graph

610 commits

Author SHA1 Message Date
Midas Chien
a0b56bde11 composer: add API to control display idle timer
Add new functions to control display idle timer
- Adding an API to r configure display idle timer.
- Extend DisplayCapability to query display support idle timer.
- Adding an callback for notify client the display is idle, the refresh
  rate changed to a lower setting to preserve power and vsync cadence
  changed. The client can enable vsync callback to learn the new vsync
  cadence before sending a new frame.

Bug: 194068871
Bug: 198808492
Test: build, vts
Change-Id: I47649d222022922926a05f2d700ca798f8f48b35
2022-01-21 15:38:52 +08:00
Ady Abraham
96e2785b7e Merge "composer: add getDisplayPhysicalOrientation" 2022-01-19 04:03:48 +00:00
Ady Abraham
ae12e389fd composer: add getDisplayPhysicalOrientation
Add an API to query the physical display orientation.

Bug: 213237830
Test: VTS
Change-Id: I4ea9ee5c8655be283e19156b0ce68e35674ac321
2022-01-19 01:13:28 +00:00
Treehugger Robot
fa31414317 Merge "Add alecmouri to composer OWNERS" am: d89d96d196 am: b766496521 am: 8f8f639518 am: a44e520716
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1949687

Change-Id: Ia2074f2f0d8cdbc8546b9eda7e3ab1759ed2d578
2022-01-14 22:37:21 +00:00
Leon Scroggins
a393f66d23 Merge "Add VTS for setLayerBlockingRegion" 2022-01-14 19:25:51 +00:00
Ady Abraham
7b957abe49 Add alecmouri to composer OWNERS
Change-Id: I01a0958e1371ba0e6a92d7f5f0d19ce0acdb7604
2022-01-14 17:10:25 +00:00
Vishnu Nair
6a265c50fc Merge "Update VTS to use ExternalTexture impl" 2022-01-14 17:04:26 +00:00
Kriti Dang
496ce11491 Merge "Composer hal changes for boot time display mode" 2022-01-14 10:39:43 +00:00
Vishnu Nair
59329712a9 Update VTS to use ExternalTexture impl
We want to expose GraphicBuffer properties via
ExternalTexture class and within, SurfaceFlinger access the
buffer via this proxy interface. This allows us to inject
and mock GraphicBuffers as needed. Specifically this will
be used to recreate layer state from transaction traces.

Test: compiles
Bug: 200284593

Change-Id: If2b6c43bb5b302fbc49dfa49d6ac1f79f92f30f7
2022-01-14 02:06:17 +00:00
Leon Scroggins III
0331815adb Add VTS for setLayerBlockingRegion
Fixes: 213361853
Test this

Change-Id: Iaca3be9f83420964cd3945d39665a95da50fee08
2022-01-13 13:56:43 -05:00
Kriti Dang
4c6e9ebf1e Composer hal changes for boot time display mode
Bug: 203520442
Test: m
Test: atest VtsHalGraphicsComposer3_TargetTest

Change-Id: I530d7f52acaaee8c728dbd9a95ecca017804304a
2022-01-13 14:41:03 +01: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