Commit Graph

632 Commits

Author SHA1 Message Date
TreeHugger Robot
66cb6f97d0 Merge "Revert "IComposerClient wrapper for VTS tests"" 2022-01-29 03:13:08 +00:00
Ram Indani
22884acd6a Revert "IComposerClient wrapper for VTS tests"
This reverts commit 634340d6a8.

Reason for revert: No one is using it, I will make a cl with usage of the wrapper along side this and reupload it.

Change-Id: I3ff3427fc9e81d53fd47a082ab027441f5dc8a66
2022-01-29 02:00:21 +00:00
Ram Indani
d1cbbea53f Merge "IComposerClient wrapper for VTS tests" 2022-01-29 01:52:29 +00:00
ramindani
634340d6a8 IComposerClient wrapper for VTS tests
A wrapper helps with implementation details of IComposerClient and
improves re-usability with readback and base tests.

BUG: 199413815

Test: atest VtsHalGraphicsComposer3_TargetTest
Change-Id: I627748d1c779eaacf92ff6fb5ccf3138a3024681
2022-01-28 23:13:18 +00:00
TreeHugger Robot
e8b2c912a2 Merge "composer3: update cursorPosition documentation" 2022-01-28 01:15:48 +00:00
Ady Abraham
ac1125cb98 composer3: update cursorPosition documentation
Remove the word asynchronous and insteam explain 
that the cursor position can be updated without a validate/present.

Change-Id: Ia01bc097bc335779dba4e06577c285ca133dfd02
Fixes: 209711877
Test: make
2022-01-27 22:57:43 +00:00
TreeHugger Robot
99684613d9 Merge "composer: adds BufferAhead for the LayerCommand.aidl" 2022-01-27 21:53:57 +00:00
ramindani
d40304b574 composer: adds BufferAhead for the LayerCommand.aidl
Adds a Capability param as BUFFER_AHEAD to check if
BufferAhead is supported.

Test: Device boots after these changes.
BUG: 198186628
Change-Id: Ic0f3e602635a2519f4e90c546dfca1af985116f9
2022-01-27 19:36:33 +00:00
TreeHugger Robot
b20697869b Merge "composer: add API to control display idle timer" 2022-01-26 03:04:51 +00:00
Jason Macnak
325e8235c3 Skip expectedPresentTime_* tests when unreliable fences cap present
... as these tests depends on present fence signal times.

Bug: b/193240715
Test: cvd start
Test: vts -m VtsHalGraphicsComposer3_TargetTest
Change-Id: Iad0b89daa85e01a287f045a91b1cbdb890fee05d
2022-01-24 14:51:19 -08:00
Alec Mouri
3e037cf683 Remove stride from VTS classes
Stride must be retrieved from the graphic buffer immediately prior to
CPU access. The previous code was tripped up by an error-prone situation
where stride was never initialized, causing UB.

Also this patch sneaks in a couple of const modifiers for methods that
pass-by-ref.

Bug: 213493262
Test: VtsHalGraphicsComposer3_TargetTest
Change-Id: Ic601cca128b71d36876ed25bd55140b02cb0ad0f
2022-01-24 10:58:41 -08:00
Treehugger Robot
fb7dff82ab Merge "composer: 2.4: vts: Add missing COMPOSER_OVERLAY allocation flag" am: 283a876e5a am: 0bda60d835 am: 59b38ef7b0 am: 82a2943aa3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1954544

Change-Id: I953de2c90498daeee6b381df262c41063d005b95
2022-01-23 14:53:04 +00:00
Alec Mouri
710a50ae6b Merge "Fix asserts for GetReadbackBufferFenceInactive" 2022-01-21 21:17:31 +00:00
Alec Mouri
62ae37be3c Fix asserts for GetReadbackBufferFenceInactive
If there's no readback buffer, then the status is NOT ok(), and the
returned fence must be -1.

Bug: 213493262
Test: VtsHalGraphicsComposer3_TargetTest
Change-Id: Iff1b6e04126bfcc748f0f8d173f63244bfd83be4
2022-01-21 19:42:32 +00:00
Alec Mouri
f23f502fcc Merge changes from topic "whitepoint_readback_vts"
* changes:
  Cleanup for readback buffer management:
  Readback test support for per-layer dimming
2022-01-21 19:42:16 +00:00
Roman Stratiienko
bf928e775d composer: 2.4: vts: Add missing COMPOSER_OVERLAY allocation flag
Without this flag, the composer will fail to PRESENT the buffer on
the systems that do not have IOMMU support and can scanout contiguous-
only buffers.

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Change-Id: I566534a2a1fb602c0ce69ef861805d4fb03d7c47
2022-01-21 10:49:47 +02:00
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
Jason Macnak
062bc9a3a6 Use IComposerClient::EX_UNSUPPORTED
Bug: b/193240715
Test: cvd start
Test: vts -m VtsHalGraphicsComposer3_TargetTest
Change-Id: Ibf80a618dead09ffdea56d373a83a691124c7d2e
2022-01-20 15:00:09 -08:00
Alec Mouri
7b4d5ee452 Cleanup for readback buffer management:
* Tests exercising that a bad readback buffer is sent should actually
use a native_handle from a deallocated buffer rather than a valid
handle, since that would still work
* Creating a readback buffer should not require passing in a buffer at
construction. Instead ReadbackBuffer should always allocate its buffer
internally whenever a new buffer needs to be generated.
* Passing the readback buffer's fence to lockAsync should be a dup'd fd,
as lockAsync takes ownership of the fence

Bug: 213493262
Test: VtsHalGraphicsComposer3_TargetTest
Change-Id: I73396f982cf9a67f0dd81eaed509cf9cc7b03314
2022-01-20 12:16:45 -08:00
Jason Macnak
e531a092fc Check createComposer().isOk() in test setup
Bug: b/193240715
Test: cvd start
Test: vts -m VtsHalGraphicsComposer3_TargetTest
Change-Id: I0a2b90bcb403fbf3454046d3e46bf972a4d149f7
2022-01-20 10:15:43 -08:00
Alec Mouri
0cb31dbb0a Merge "Add VTS for setting layer white point" 2022-01-20 17:57:09 +00: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
Alec Mouri
510670192a Readback test support for per-layer dimming
Dimming is only verified if setting display brightness is supported. The
test then does:
* Sets the display brightness to max, which is the same nit level that
is found in the display xml file
* Dims a layer by 10%

Bug: 213493262
Test: builds
Change-Id: I3b552682276be26fefd7ae5586ba42af0e574e31
2022-01-14 11:10:59 -08:00
Alec Mouri
95e490bf23 Add VTS for setting layer white point
No readback tests as of yet, as that will necessitate a new api to get
the max display brightness, so that we can max out the brightness -> use
well-defined dimming ratios

Bug: 213493262
Test: builds
Change-Id: I0166dc67f4c52919c02ab7abbf47701e6be3d983
2022-01-14 10:50:05 -08: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