Commit graph

758 commits

Author SHA1 Message Date
Dan Stoza
fab392342d Remove stoza@ from OWNERS
Removing stoza@ (and other stale entries) from OWNERS since he's leaving

Bug: N/A
Test: N/A
BYPASS_INCLUSIVE_LANGUAGE_REASON=Correct pronouns for stoza@
Change-Id: Ic372a1ce4f27fdf8a1faf9b6f66792d729acbe99
2021-02-04 20:10:14 +00:00
Jeongik Cha
1674c1354e Specify version for aidl_interface explicitly
Bug: 150578172
Test: m
Change-Id: Ie7605c203c0f0eaf2c40f1e64ea45634b3aa54a5
Merged-In: I141de8ed6958fe42f727a0fa41473de4c1fb38de
2021-01-28 15:14:10 +00:00
Marin Shalamanov
6f36dd6e31 VTS: Test that configs in a group differ only by vsync period
All display configs in a config group must have the same resolution
and DPI (if DPI attributes are supported by HWC).

Fixes: 172902326
Test: atest VtsHalGraphicsComposerV2_4TargetTest
Change-Id: Id86fe7983a12e33d2d9c3b88ee68d6e18485e87d
2020-12-28 19:35:49 +00:00
Xin Li
c371fcd552 DO NOT MERGE - Merge RQ1A.201205.011
Bug: 172690556
Merged-In: I3962ede51ce823368c62c4e4e5fb30f7a5680bdf
Change-Id: Ia68bf79ad9a0782e2818a2abfda69ad0d2122101
2020-12-07 00:39:42 -08:00
Ady Abraham
93de2043a8 composer: fix 2.4 vts for multi-display
Fix the way the test handles multi-displays by caching
all the hotplug events received when registering the callback

Test: VTS on Pixel 4
Bug: 174174253
Change-Id: I9a69b18bcef0722e603f2ca58cfbd176ea60f5f2
Merged-In: I9a69b18bcef0722e603f2ca58cfbd176ea60f5f2
2020-12-03 18:21:40 +00:00
Treehugger Robot
1d8b9fc0b7 Merge "Support waiting for surfaceflinger service to stop before test starts" 2020-12-02 07:43:07 +00:00
Marin Shalamanov
37c5495c52 Clarify the ComposerClient comment for CONFIG_GROUP
Clarify that configs with the same group should differ only
by refresh rate.

Test: n/a
Merged-In: I2b09689825fc9564665324ff18eb1907765b9016
Change-Id: I2b09689825fc9564665324ff18eb1907765b9016
2020-11-19 10:49:53 +00:00
Dan Shi
e25724e411 Support waiting for surfaceflinger service to stop before test starts
Bug: 168787663
Test: atest VtsHalGraphicsComposerV2_1TargetTest \
  VtsHalGraphicsComposerV2_2TargetTest \
  VtsHalGraphicsComposerV2_3TargetTest
Change-Id: I1219b8446ca3ac3d22f3fd6ab72cd8a214f55545
2020-11-03 11:33:01 -08:00
Ana Krulec
564eab6f01 Moving composer@2.1 library away from shared
Adding the ability for tests to add
"android.hardware.graphics.composer@2.1-resources" as
as static library.

Test: atest sffakehwc_test on cuttlefish on aosp-master
Bug: 160796914
Change-Id: I8cb80102bd836f8f211602cb36fd857757e8323c
2020-11-02 18:07:37 -08:00
stevensd
2d82c11b0f Merge "graphics: fix use-after-free in mapper 2.0 passthrough" 2020-10-27 00:35:56 +00:00
David Stevens
be8f52e8b0 graphics: fix use-after-free in mapper 2.0 passthrough
The mapper 2.0 gralloc passthrough keeps a set of the native_handle_t
pointers of all imported buffers. This change ensures that the
underlying HAL wrapper freeing the native_handle_t is performed
atomically with respect to accesses to the passthrough's native_handle_t
pointer set.

This fixes a race where a native_handle_t could be reallocated between
being freed by the HAL wrapper and removed from the passthrough's set,
which could then cause the import which happened to reallocate that
native_handle_t to spuriously fail.

Bug: 170798776
Test: Manually very no more spurious import failures in ARCVM's decoder.
Change-Id: I654a44e94adb319f54fb462f4484db414ca1b154
2020-10-22 09:45:09 +09:00
Steven Moreland
67f5d0f838 Update VNDK version for common graphics HALs.
We are adding things to them, and in order for core libraries like libui
to use them, the newer versions need to be in the VNDK.

Bug: 170435409
Test: build
Change-Id: I4094240656f357b5ae52194befd0e10627b9fe23
Merged-In: I4094240656f357b5ae52194befd0e10627b9fe23
2020-10-19 21:04:14 +00:00
Ady Abraham
1019a17a92 composer: hold a sp<IComposer> from the service itself
IComposerClient assumes that IComposer will outlive its life cycle
and holds a simple pointer to HwcHal. This change is taking the same
approach of newer composer versions (2.2, 2.3, and 2.4) to make sure
that IComposer would outlive IComposerClient.

Test: coral booting with this change
Fixes: 155769496
Change-Id: I3962ede51ce823368c62c4e4e5fb30f7a5680bdf
Merged-In: I3962ede51ce823368c62c4e4e5fb30f7a5680bdf
(cherry picked from commit 43e42ff6ec)
(cherry picked from commit 1368c29213)
2020-10-13 01:08:04 +00:00
Treehugger Robot
ca31517201 Merge "Mark GraphicsMapperHidlTest as allowing not being instantiated" 2020-09-28 21:47:07 +00:00
Dan Shi
f2b950f470 Rename vts-core to vts
Bug: 151896491
Test: none
Change-Id: If74547c56b46ebc7fd728c1bf52fe9dedac65ffa
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-09-26 04:11:28 +00:00
Chris Forbes
3c9a3a0cd1 Mark GraphicsMapperHidlTest as allowing not being instantiated
Only the variant(s) actually implemented by the device will be
instantiated.

This is consistent with tests for other versioned or optional HALs.

Bug: b/167222309
Test: atest VtsHalGraphicsMapperV2_0TargetTest:GoogleTestVerification#UninstantiatedParameterizedTestSuite<GraphicsMapperHidlTest> -- --abi arm64-v8a
Change-Id: I4f1bfbad47bdbf75578ec48a3a56fb5351e7729a
2020-09-25 21:07:53 -07:00
Dan Shi
ac9cf4482b Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I627d6790aa08aa9c6e3c5b8bdc533213ee08de21
Merged-In: I627d6790aa08aa9c6e3c5b8bdc533213ee08de21
2020-09-11 11:02:25 -07:00
Ady Abraham
8c33403a10 composer: 2.4: fix VTS usage of desired time am: 30d2573834
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12171999

Change-Id: I41b741a51c52e8e09e20e2dbd7f46c2b2238f840
2020-07-16 21:15:52 +00:00
Ady Abraham
30d2573834 composer: 2.4: fix VTS usage of desired time
Test_setActiveConfigWithConstraints is setting the desired time
for a config change to be before the test starts.
This causes the test to use the same value for all configurations,
which becomes stale the more configurations the device supports.
This fix is setting the desired time before calling
to setActiveConfigWithConstraints.

Bug: 161023185
Test: adb shell data/nativetest64/VtsHalGraphicsComposerV2_4TargetTest/VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I236e5c9c16b4ba730677cd4c980a7071ba25840e
2020-07-16 20:00:44 +00:00
TreeHugger Robot
4b90115190 Merge "composer: 2.4: VTS using old value for parameter" into rvc-dev am: 32e3cd9a02
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12143287

Change-Id: I4e4e31b8d71af30dbc6aac64564b00d166a14a87
2020-07-14 19:15:46 +00:00
Ady Abraham
0a19601eae composer: 2.4: VTS using old value for parameter
Fix a test that is using the incorrect parameter.

Bug: 161023185
Test: adb shell data/nativetest64/VtsHalGraphicsComposerV2_4TargetTest/VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I8574abed50c23657f5d96e9d396709cb9b92e1fd
2020-07-13 23:30:05 +00:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Naseer Ahmed
5f9995dc9a Do not link mapper libraries statically am: fbcb5a89c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11970027

Change-Id: I600ebe8bd0291a81f03efc33a7642bb2b0b7c9c4
2020-06-24 08:16:34 +00:00
Naseer Ahmed
fbcb5a89c9 Do not link mapper libraries statically
Linking them statically prevents the mapper SP HAL from being
extended

Bug: 158465474
Test: local build vts tools.
      Passed on VtsHalGraphicsComposerV2_XTargetTest.
Change-Id: I916b1c042b1e81e53f7398cd4a1a2231469ea91f
2020-06-24 07:10:58 +00:00
TreeHugger Robot
1705471cc1 Merge "Add test for subsample metadata for YUV420 format" into rvc-dev am: e83c8b22e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11736601

Change-Id: Ibb503d88b4656056a63195c40b4dcad0422a9016
2020-06-23 16:00:47 +00:00
TreeHugger Robot
e83c8b22e3 Merge "Add test for subsample metadata for YUV420 format" into rvc-dev 2020-06-23 15:44:49 +00:00
layog
e886f80942 Add test for subsample metadata for YUV420 format
Bug: 153704651
Test: atest VtsHalGraphicsMapperV4_0TargetTest
Change-Id: Ie7a521b19b2eb1c459327fe699253aaa50ae8257
2020-06-20 11:54:25 +08:00
TreeHugger Robot
dc2a322213 Merge "gralloc4-vts: Correct the ownership of fence fd" into rvc-dev am: 86aa285936
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11880423

Change-Id: I4d0b921bd4a3cddb0b306d02aed5f0f1830d4831
2020-06-19 01:16:42 +00:00
Yichi Chen
448369c954 gralloc4-vts: Correct the ownership of fence fd
Gralloc::lock takes the ownership of acquireFence and closes the fence
by itself. The patch changes the behavior of fence to transfer the
ownership by unique_fd::release.

Bug: 157534008
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: Ie4ee9cd9c3b148cab9187fa07a4e52cbf9ad798a
2020-06-16 17:26:18 +08:00
TreeHugger Robot
e8303a537a Merge changes Ic0d7b4d2,I3441e630,Ie504e687 into rvc-dev am: 2e5dd7ab32
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11686091

Change-Id: Ie8902039154646d934efb7bf773ca1c8ada5ff1a
2020-06-15 03:42:54 +00:00
TreeHugger Robot
2e5dd7ab32 Merge changes Ic0d7b4d2,I3441e630,Ie504e687 into rvc-dev
* changes:
  gralloc4-vts: Test metadata is consistent in cloned buffers
  gralloc4-vts: Test layout and component info of RAW12
  gralloc4-vts: Test layout and component info of RAW10
2020-06-15 03:25:50 +00:00
TreeHugger Robot
4a2c990dd7 Merge "Fix subsampling doc in PlaneLayout.aidl" into rvc-dev am: 6841c3e5e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11716801

Change-Id: I7ca1d951940fc05ea1c7e957b5e52956117ad880
2020-06-09 14:38:43 +00:00
Yichi Chen
35d97d5417 gralloc4-vts: Test metadata is consistent in cloned buffers
GetMetadataClonedHandle checks the metadata can be gotten after a native
handle is cloned. SetMetadataClonedHandle checks the metadata can be set
on a cloned native handle.

Bug: 155224585
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: Ic0d7b4d21a64822f2f1dbeca8d48c450711ed494
2020-06-08 16:43:55 +08:00
layog
26ddd0125c gralloc4-vts: Test layout and component info of RAW12
Bug: 157534008
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I3441e630b18f3d6e0f5cbcecf8a54dc1b42faa84
2020-06-08 16:43:53 +08:00
Yichi Chen
0809466b61 gralloc4-vts: Test layout and component info of RAW10
To ensure the correctness of the plane layout and layout component on
RAW10 format, the patch creates the test case to check corresponding
data.

Bug: 157534008
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: Ie504e687e149ee4f4fb3f715ee0de7d7ec31952a
2020-06-08 16:42:39 +08:00
layog
96c0c3705e Fix subsampling doc in PlaneLayout.aidl
A subsampling value of 1 is a valid value indicating no subsampling

Fix: 158067777
Test: Compiles
Change-Id: I58f20df0b61e3637cb01a69f28ecef414f88a27d
2020-06-04 15:26:57 +08:00
Midas Chien
8c79371377 Merge "composer: vts: send refresh frame even composition changes" into rvc-dev am: ac4ee96268
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11631145

Change-Id: Ie92e8d7df9f0622c5f4fa23b0244ba433cc55e54
2020-06-02 16:57:19 +00:00
Midas Chien
2f5aec7024 composer: vts: send refresh frame even composition changes
sendRefreshFrame is used to send refresh frame to composer, so even
composition changes should present frame to composer.

Bug: 157638511
Test: VtsHalGraphicsComposerV2_4TargetTest on C2, R3
Change-Id: I325668b7a75cbbe72841c424eb9fc43479ac48b6
2020-05-28 22:53:01 +08:00
TreeHugger Robot
fe6dec9f22 Merge "gralloc4-vts: Allow getFromBufferDescriptorInfo return unsupported" into rvc-dev am: 5f0ce20538
Change-Id: If11bf8b0f2c728199c95b032785af63ef8e2134f
2020-05-25 02:49:51 +00:00
TreeHugger Robot
5f0ce20538 Merge "gralloc4-vts: Allow getFromBufferDescriptorInfo return unsupported" into rvc-dev 2020-05-25 02:33:51 +00:00
Jooyung Han
b3310b3667 Set min_sdk_version to be part of mainline modules am: 350467dac3
Change-Id: Icd49e7d76c50b7bb676a86dfa7f2a78606c5a2f8
2020-05-21 20:10:31 +00:00
Jooyung Han
350467dac3 Set min_sdk_version to be part of mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Change-Id: Ie6912167932812afb6e5f1ef5325ce7997cd04ae
2020-05-21 22:58:23 +09:00
Yichi Chen
e4f244e26b gralloc4-vts: Allow getFromBufferDescriptorInfo return unsupported
According to the definition of getFromBufferDescriptorInfo, UNSUPPORTED
should be returned if the requested metadata is not defined until a
buffer has been allocated. Before we clarify the necessary metadata,
the patch allows all of them return unsupported.

Bug: 155626288
Test: VtsHalGraphicsMapperV4_0Target

Change-Id: I42a3b07b0b60ca555ebe949bbac0dd68d4e06231
2020-05-21 20:39:21 +08:00
TreeHugger Robot
0d5d5cd875 Merge changes I926887cc,I7def937e,I530f6d89,I393fc3c4 into rvc-dev am: ad17ebe23b
Change-Id: Ic0ce51c021770db45e3fde6f15fcb8c123ee5587
2020-05-13 09:17:23 +00:00
Yichi Chen
5bec8ba8a2 gralloc4-vts: Hold fence by unique_fd to avoid leakage
There was fd leakage when fence was assigned to other values without
releasing previous file descriptor. The patch introduces unique_fd to
hold the fence without leaking fd.

Bug: 150461327
Bug: 152510209
Test: VtsHalGraphicsMapperV4_0Target

Change-Id: I926887ccd2c626da2d2c1a6b9d7cd433f9d5b717
2020-05-12 08:58:16 +08:00
Yichi Chen
ad8b9ad68c gralloc4-vts: Restore Lock_YCBCR_420_888 and create Lock_YV12
The patch adds back Lock_YCBCR_420_888 and also creates Lock_YV12 to
verify planner format with the checks on subsampling, chroma step, and
CbCr offsets.

Bug: 150461327
Bug: 152510209
Test: VtsHalGraphicsMapperV4_0Target

Change-Id: I7def937e9b65e99569a3dc2230e7e929477c06eb
2020-05-12 08:58:16 +08:00
Yichi Chen
f4d374a758 gralloc4-vts: Extract YCbCr888 data operation from Lock_YCRCB_420_SP
The patch extracts the common operation on YCbCr888 data to allow a
better reuse in tests with other YCbCr color formats

Bug: 150461327
Bug: 152510209
Test: VtsHalGraphicsMapperV4_0Target

Change-Id: I530f6d895c338fb041f7705aa9a4fd36931a1588
2020-05-12 08:58:16 +08:00
Yichi Chen
c6394fffa8 gralloc4-vts: Allow YCRCB_420_SP to be unsupported in Lock_YCRCB_420_SP
Some devices may not support the legacy YCRCB_420_SP format. To allow
the test can pass through such devices, the patch adds the flexibility
when UNSUPPORTED is returned from buffer allocation.

Bug: 150461327
Bug: 152510209
Test: VtsHalGraphicsMapperV4_0Target

Change-Id: I393fc3c4a7d2421f07eeff88915041c92e8cdf05
2020-05-12 08:58:08 +08:00
Valerie Hau
33569f0bc0 Merge "Allow for failure in allocation for MapperVts" into rvc-dev am: f207cca044
Change-Id: Ifead8f280bab46900529a8883da7188077fa3eb5
2020-05-11 23:47:56 +00:00
Valerie Hau
f207cca044 Merge "Allow for failure in allocation for MapperVts" into rvc-dev 2020-05-11 23:34:30 +00:00