Commit graph

1155 commits

Author SHA1 Message Date
Alec Mouri
960c14db22 Check the correct sysprop for P010 support for gralloc 3 and 4.
We need to check the first api level that the vendor shipped with.

Also check P010 support in the preamble of the relevant test rather than in allocate(), since otherwise either allocate() may incorrectly skip some tests or allocate() may succeed but with the wrong layout information.

Bug: 257442231
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I00ae5aa01117704158c38f0689e91df99473e208
Merged-In: I00ae5aa01117704158c38f0689e91df99473e208
2023-02-16 23:16:14 +00:00
Shubhangi Pawar
3e1907ae4a Merge "composer: vts: Init display dimension using active config" into android13-tests-dev 2023-01-09 18:59:00 +00:00
HyunKyoung
37b3413684 composer: vts: Init display dimension using active config
Dimension was initialized to the size of the last config that is in the config list.
VTS didn't change the dimension in the readback test and allocated buffer
for the readback with the dimension size.
However it was different with actual display size.
This change initializes display dimension to the actual display size.

Bug: 259155172
Change-Id: I64fec02f5386eb6ca1f41ab376be193231810b93
Merged-In: I64fec02f5386eb6ca1f41ab376be193231810b93
Signed-off-by: HyunKyoung <hk310.kim@samsung.com>
2023-01-09 04:56:06 +00:00
Midas Chien
1120a6f78c composer: vts: configure layer for DisplayDecoration
Some HW may not support crop function for decoration and current API
can't query this capability. Configure decoration layer to full screen
to avoid this limitation.

Bug: 225765061
Bug: 259505289
Test: VtsHalGraphicsComposer3_TargetTest
--gtest_filter=*DisplayDecoration*

Change-Id: If47154adf9d48f9c1b8390b4bee090d8bf40ff3b
(cherry picked from commit 7d55d4269d)
Merged-In: If47154adf9d48f9c1b8390b4bee090d8bf40ff3b
(cherry picked from commit 308f4ac906)
Merged-In: If47154adf9d48f9c1b8390b4bee090d8bf40ff3b
2022-11-22 18:06:39 +08:00
JihCheng Chiu
10750526a6 fix segmentation fault of GraphicsComposerAidlCommandTest
When we run the VTS of GraphicsComposerAidlCommandTest, we always meet
segmentation fault issue in some test items. VTS test items crashed
when it deleted the layer or display from resource manager and try to
go next loop.
The problem is the test item try to delete the layer iterator or
display iterator in the loop, so the iterator become an invalid
iterator. Then it try to use the invalid iterator for going to next
iterator. This behavior caused segmentation fault. We use different
way to fix deleting layer and deleting display.
Delete layer: Test item always delete all layer for each display, so
              we always delete layer via get the first iterator until
              the resource manager is empty.
Delete display: Test item only delete virtual display, so we move the
                physical display to a temporary map. After delete all
                virtual display, we swap the temporary map and
                original map.

Bug: 243781450
Test: 1. test GraphicsComposerAidlCommandTest.SetLayerColorTransform
         for deleting layer
      2. test GraphicsComposerAidlCommandTest.SetOutputBuffer
         for deleting disply

Change-Id: Id467df658e78ed29fdfc039cabc119f8bf62d69d
2022-08-25 12:21:47 +00:00
ramindani
b2b747ffd4 [VTS] Update allocator name for AIDL allocator.
We used "default" value for the allocator in the test
and this value was used as is for the AIDL allocator.
This caused the test to fail because we were not able to acquire the
appropriate allocator as AIDL allocator instance is not named "default".
Update the test to use the correct instance name for AIDL allocator,
if available.

Test: atest VtsHalGraphicsComposerV2_1TargetTest
atest VtsHalGraphicsComposerV2_2TargetTest
atest VtsHalGraphicsComposerV2_3TargetTest
atest VtsHalGraphicsComposerV2_4TargetTest
atest VtsHalGraphicsComposer3_TargetTest
BUG: 234671596

test results after updates:
VTS 2.1 : http://ab/I84600010058657636
VTS 2.2 : http://ab/I51800010058498973
VTS 2.3 : http://ab/I87700010058914863
VTS 2.4 : http://ab/I88900010058592031
VTS 3.0 : http://ab/I96200010058838905

Change-Id: I04ae1a18d757cfd941d4929ad08f6bb2c8643f76
2022-06-07 23:33:12 +00:00
Ankit Goyal
694e50be3b Skip front buffer test if not supported
Bug: 218383959
Test: this
Change-Id: I61beba63556c1d6a32e220fffd8e4b4fdfd8bd94
2022-05-26 17:04:18 -07:00
Ankit Goyal
72415bcfa3 Do not generate failed status on allocation failure
Bug: 218383959
Test: this
Change-Id: Ibb37d9cad8004d31c3d7cb75ebfa7839f7d07ed0
2022-05-26 17:04:12 -07:00
Alec Mouri
38ccfd7a29 Tweak IMapper 4.0 VTS to run with AIDL IAllocator
When there is no HIDL IAllocator installed on the device, then these
tests must still run.

Bug: 231982605
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: If7503d398c03086df470971cc2c10029270525f9
2022-05-23 18:38:37 +00:00
Jason Macnak
895d411403 Update Mapper4 SetBadMetadata VTS test for optional metadata
The common decode function for optional gralloc4 metadata
`android::gralloc4::decodeOptionalMetadata()` treats an empty
input `hidl_vec<uint8_t>` as `std::nullopt` and not a bad
value. aosp/1907915 previously tried to update the encoding
and decoding of optional metadata in order to distinguish
this case but the change broke GRF. Instead, let's update the
SetBadMetadata test to use some actual incorrect data for the
optional metadata tests instead of an empty vec.

Bug: b/207388558
Test: cvd start
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I87c20930cb701e87c89489bd0359cce0522cfe44
2022-05-11 22:25:28 +00:00
Jiyong Park
9264d3f783 Finalize android.hardware.graphics.common-V3
For some unknown reason, the Android.bp file was not updated when
freezeing the V3 of android.hardware.graphics.common interface. Fixing
it manually.

Bug: 230660133
Test: `m nothing` with https://googleplex-android-review.git.corp.google.com/q/topic:Tiramisu-SDK-Finalization-rel
Change-Id: I4bf6548e1200864810bcf8a7c1025ba56d48747b
2022-04-28 08:07:53 +09:00
ramindani
d575109c1e Check Exception Code for Service specific error
Before checking the service specific error
we need to check that getExceptionCode returns
EX_SERVICE_SPECIFIC error code. Added a method and
used that to do the two checks together for exceptionCode
and for the service specific error code, so that we don't
repeat two lines in all the tests that need them.

EXPECT_NO_FATAL_FAILURES print the correct line number of the test
or iteration of the test when used with helper functions, and
testing guidelines recommend it too here: go/gunitadvanced#propagating-fatal-failures

Test: atest VtsHalGraphicsComposer3_TargetTest
BUG: 205152739
Change-Id: I1d3c3aa9b34dcefb14be507ff61b73b6f08a5204
2022-04-25 20:44:04 +00:00
ramindani
c7585d9dc4 Set isOpaque For BlendMode::None
Test: atest VtsHalGraphicsComposer3_TargetTest
BUG: 216205298
BUG: 219576457

Change-Id: I479d8367e5abf8893b94ac64b7149a2f0e4cf75b
2022-04-22 16:25:39 +00:00
Jiyong Park
18ba537008 Merge changes from topic "aidl_freeze_tm" into tm-dev
* changes:
  V1 is the latest version of android.media.audio.common.types
  Freeze AIDL APIs for TM
2022-04-20 15:55:20 +00:00
TreeHugger Robot
bce81ecc1e Merge "Move ComposerServiceWriter to composer3." into tm-dev 2022-04-19 21:32:21 +00:00
Jiyong Park
70f5837e1f Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: I61eb51c0334eb99489c6f1570110d7e18c350c99
2022-04-16 07:03:24 +09:00
Alec Mouri
da91f729c1 Merge "Send brightness nits to composer" into tm-dev 2022-04-11 16:28:58 +00:00
Rachel Lee
d69c54a4e1 Move ComposerServiceWriter to composer3.
It can be reused more easily.

Bug: 216204575
Test: m; flashall
Change-Id: I76b8533ba16ad1d01fcd182bf72b65982dce7c20
2022-04-08 16:09:32 -07:00
Alec Mouri
18339992dd Allow old gralloc implementations to skip P010 support.
P010 is mandated for vendor versions that are at least api level 33.
Gralloc versions below this may not support P010 due to lack of
enforcement, but tests for already-shipping devices must still pass.

Bug: 220360702
Test: VtsHalGraphicsMapperV3_0TargetTest
Change-Id: I7ba268713bada133491813aa3c9bd87fdecd2fef
2022-04-06 19:00:23 +00:00
TreeHugger Robot
486839fdef Merge "Update renderengine dependency to VTS" into tm-dev 2022-04-02 07:47:52 +00:00
Jiyong Park
7faedf81a0 Merge changes from topic "aidl_freeze_tm" into tm-dev
* changes:
  Implement getInterfaceHash/Version for SoundTrigger
  Add -Wno-missing-permission-annotation for soundtrigger3
  V3 is the latest version of keymaster HAL interface
  Freeze AIDL APIs for TM
2022-04-02 00:15:20 +00:00
John Reck
ddd4329e61 Add a few tests that FRONT_BUFFER is flushing properly
Test: this
Bug: 217776226
Change-Id: I49e32391620e005700d39539ca47da64199067a0
2022-03-31 15:50:14 -04:00
Jiyong Park
703e97920e Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
2022-03-31 12:01:39 +09:00
Alec Mouri
55f76ca7af Update renderengine dependency to VTS
Bug: 218954037
Test: builds
Change-Id: I31f8a8764fa66a9aec4762354c425ba1442ef351
Merged-In: I31f8a8764fa66a9aec4762354c425ba1442ef351
2022-03-31 01:16:14 +00:00
Alec Mouri
03b6daac4a Send brightness nits to composer
Bug: 220396224
Test: builds, boots
Change-Id: I6866422130776ae25d791b3cfd0d1a754d2488b9
2022-03-31 01:12:34 +00:00
Alec Mouri
d48a5a9829 Clarify documentation for the dimming stage.
Plumbing this enum to RenderEngine requires knowledge of the intended
transfer function to apply the dimming stage in. Because this is
expected to be a contrained use-case and because apis are frozen,
document that RenderEngine is allowed to assume that the resulting
dimming matrix may be gamma corrected using a 2.2 power function.

Bug: 218954037
Test: builds
Change-Id: Ie7d357f8ce79295af017d80c62a2759dbccce5d2
2022-03-24 15:54:05 +00:00
Ram Indani
4f7f81c855 Merge "[HWC3.0] Add capability BOOT_DISPLAY_CONFIG" into tm-dev 2022-03-18 19:04:40 +00:00
ramindani
476314cc54 [HWC3.0] Add capability BOOT_DISPLAY_CONFIG
This Capabiliy::BOOT_DISPLAY_CONFIG will make
the display boot display config optional on the HWC3.0

BUG: 216113429
Test: atest VtsHalGraphicsComposer3_TargetTest
Change-Id: I3be3383922fdd91e0bbccebd3c73e458753b749f
2022-03-16 18:43:15 +00:00
TreeHugger Robot
4e102c0854 Merge "Clear apex.go entries for bluetooth libs" into tm-dev 2022-03-15 00:58:00 +00:00
Ady Abraham
261db780b4 composer: minor documentation fix
Bug: NA
Change-Id: I167f6a1224ceed48723f3af15a07d71fbde168cc
Test: NA
2022-03-08 23:22:37 +00:00
William Escande
d9d513fd47 Clear apex.go entries for bluetooth libs
Test: Build + TH + boot phone & use bluetooth
Bug: 216433795
Change-Id: Ib1f9fee90006c73e5726a208e6cba8647967f5f4
2022-03-02 20:27:06 +01:00
ramindani
a4e7636e62 Vts BlendMode tests skip for UNSUPPORTED ColorMode
BUG: 221887749
Test: atest VtsHalGraphicsComposer3_TargetTest
Change-Id: I6c0a35c64883333c70451c717f50cb84d85ce994
2022-03-02 04:14:18 +00:00
ramindani
44c952f69c Vts readback status check fixes
When we query for the getReadbackBufferAttributes
we can get EX_UNSUPPORTED error when not supported
and when this happens readback should not be supported.
EXPECT_TRUE for this failure case
was causing the test to fail when we received an EX_UNSUPPORTED
 for this.
See for documentation: https://source.corp.google.com/android/hardware/interfaces/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl;rcl=e1f0950945f687ed374a45911e2d7786de724ca4;l=436

BUG: 221889462
Test: atest VtsHalGraphicsComposer3_TargetTest
Test link for the cf_x86_64_phone-userdebug  http://ab/I39800010022763398
All the other test failures are tracked else where.

Change-Id: Idf352761c5cc808540edfe2042c5ee4602b5e96b
2022-03-01 01:18:53 +00:00
Leon Scroggins III
68b9acc4fe DisplayDecoration VTS: remove expected changed composition types
If validateDisplay returns an error, changed composition types are not
propagated back to the caller. Remove the expectation that they will be.

Fixes: 221406264
Test: this
Change-Id: I3e07e40b0c12a2cf6eaa685435647aab93172bb0
2022-02-25 13:17:10 -05:00
TreeHugger Robot
a123e7688d Merge "Actually add DimmingStage to client target properties" into tm-dev 2022-02-24 22:51:17 +00:00
Leon Scroggins
5298f2c0e2 Merge "getDisplayDecorationSupport: expect IComposerClient::EX_UNSUPPORTED" into tm-dev 2022-02-24 21:27:42 +00:00
Alec Mouri
88e871b663 Actually add DimmingStage to client target properties
This change was missed while cherry-picking
I5675c16f0895f9958e3bee3ee4c85df8937ecdb7 due to merge conflicts.
So...actually merge this.

Bug: 218954037
Test: builds
Change-Id: Idb3a518f7dfd4f4fd598672ee709ccd5b1f3f06a
2022-02-24 12:18:37 -08:00
Jason Macnak
194a26f53d Merge "Minor spelling fix" into tm-dev 2022-02-24 18:16:50 +00:00
Leon Scroggins III
6455e797c6 getDisplayDecorationSupport: expect IComposerClient::EX_UNSUPPORTED
This is the error returned by cuttlefish, not EX_UNSUPPORTED_OPERATION.
This also matches other tests, e.g. SetDisplayBrightness.

Bug: 209458568
Test: this
Change-Id: I885767c4f1c42edfb11359b36852a863cbc8b0ed
2022-02-24 12:21:11 -05:00
TreeHugger Robot
b4fa6d0138 Merge "Update the test directory structure" into tm-dev 2022-02-24 04:53:07 +00:00
TreeHugger Robot
6f62c70f4f Merge "Add composer API changes in accordance to partner feedback" into tm-dev 2022-02-24 04:41:53 +00:00
Alec Mouri
ca18b9661b Merge "Remove concept of nits from the client target properties" into tm-dev 2022-02-24 01:48:53 +00:00
Alec Mouri
8ff184b518 Add composer API changes in accordance to partner feedback
* Add a DimmingStage to the client target configuration reported by HWC,
  which may be used for some vendor color modes to configure when
  dimming should occur during client composition
* Communicate the display brightness in nits, so that HWC
  implementations do not need to parse the per-display xml to map from
  display brightness to nits. Furthermore, this is more plausible for
  extensibility for external displays.

Bug: 220396224
Bug: 218954037
Test: builds
Change-Id: I5675c16f0895f9958e3bee3ee4c85df8937ecdb7
2022-02-24 01:45:41 +00:00
Chih-hung Hsieh
34593d4e2a Merge "Add timed out test files to tidy_timeout_srcs" am: ff54f73b4f am: fa83970b3a am: 581616e658
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1992232

Change-Id: I2eac13fe3b5ab0b4f15d6ceadf376e5e74124a81
2022-02-24 01:32:09 +00:00
Alec Mouri
bf0bbc2db0 Remove concept of nits from the client target properties
An earlier patch replaced white point nits with a per-layer brightness.
This patch does the same for providing the brightness space of the
client target relative to the display brightness.

Bug: 217961164
Test: builds, boots
Change-Id: I1be65f7c511fefa239305e0735637126a1cd6622
Merged-In: I1be65f7c511fefa239305e0735637126a1cd6622
2022-02-23 23:04:55 +00:00
ramindani
458e53e889 Update the test directory structure
vts is moved from aidl/android/ to aidl/vts
functional, include & composer-vts directory is removed as well.

BUG: 220171967
Test: atest VtsHalGraphicsComposer3_TargetTest
Change-Id: I6cafbbd99374308a1cc06e27cc590e70618f7075
2022-02-23 22:33:25 +00:00
Jason Macnak
6ee0f75051 Minor spelling fix
Change-Id: Ibcad1d80e09ff547c2935bbc362809431a4c3f14
2022-02-23 21:12:36 +00:00
TreeHugger Robot
a0fb8acaa5 Merge "getDisplayDecorationSupport test: allow errors" into tm-dev 2022-02-23 17:31:08 +00:00
Leon Scroggins III
915908797a getDisplayDecorationSupport test: allow errors
Allow getDisplayDecorationSupport to return an error, and treat that as
unsupported. This allows Cuttlefish, which, with
I91105fc3345dbd75aeb0b102f3f0138fa33120c0, returns Unsupported, to pass
the test.

Bug: 209458568
Test: this
Change-Id: I8e17d3c0ca0ac4eacb0b5e4c8ae540f271e68a23
2022-02-23 09:51:21 -05:00
Ady Abraham
89d7270dcd composer: remove IComposer.dumpDebugInfo
aidl already have a dump funciton, so there is no need to
expose a custom dumpDebugInfo from IComposer.

Bug: 220171623
Test: atest VtsHalGraphicsComposer3_TargetTest
Test: adb shell dumpsys SurfaceFlinger
Test: adb shell dumpsys android.hardware.graphics.composer3.IComposer/default
Change-Id: I5036193c06ba9fdd8aa5f79cd756541d9edc146c
2022-02-22 02:54:41 +00:00