Commit graph

721 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
5f0ce20538 Merge "gralloc4-vts: Allow getFromBufferDescriptorInfo return unsupported" into rvc-dev 2020-05-25 02:33:51 +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
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
f207cca044 Merge "Allow for failure in allocation for MapperVts" into rvc-dev 2020-05-11 23:34:30 +00:00
Valerie Hau
7b4e37a989 Allow for failure in allocation for MapperVts
Bug: 155942443
Test: build, boot
Change-Id: I8698e4cf117d54a6d2ff128cc2e503308188c7e6
2020-05-11 14:18:46 -07:00
Valerie Hau
7b25582017 Merge "Fix Mapper Protected test" into rvc-dev 2020-05-08 21:36:15 +00:00
Valerie Hau
2b4caee38a Fix Mapper Protected test
Bug: 155942443
Test: build, boot
Change-Id: Ie258184981615d714878b108f2e00452fbf95358
2020-05-08 10:17:49 -07:00
Midas Chien
738702f875 composer: vts: send a frame after call setActiveConfig
setActiveConfig will take effect follow by a frame updated. To
make sure it takes effect, send a frame after setActiveConfig.

Bug: 150831726
Test: VtsHalGraphicsComposerV2_4TargetTest
Change-Id: Ib999e808ac1339d1cba9e25e9a57b681b055cc99
2020-05-01 00:42:57 +08:00
TreeHugger Robot
1b33916a3b Merge "Freeze vintf aidl interfaces" into rvc-dev 2020-04-10 12:38:13 +00:00
Yichi Chen
059441bdd2 gralloc4-vts: Correct plane layout test of RGBA_8888 and YCbCr_420
The patch enhanced the plane layout tests in verifyRGBA8888 and
Lock_YCRCB_420_SP with considerations of sample increment and
subsampling.

Test: VtsHalGraphicsMapperV4_0
Bug: 150461327
Change-Id: I16fce5f29ec927de110cbaf5767e0b585d3c1919
2020-04-10 15:40:24 +08:00
Jeongik Cha
7e2674589f Freeze vintf aidl interfaces
AIDL interfaces which are vintf-stable have to be frozen in release.
But these interfaces have been never frozen, so freeze them.

- android.hardware.common
- android.hardware.automotive.occupant_awareness
- android.hardware.rebootescrow
- android.hardware.graphics.common

Bug: 153510296
Bug: 153510400
Bug: 153510960
Bug: 153511702
Test: m
Change-Id: I56e53209eaf00518ec83f2a322e89d6d944eb0ac
2020-04-08 13:36:51 +00:00
Dan Shi
aad51fa000 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 16:37:40 -07:00
Steven Moreland
6b2eaec3a6 Merge "graphics.composer@2.2 rc remove interface decls" into rvc-dev 2020-04-03 19:29:45 +00:00
Steven Moreland
36f210147d graphics.composer@2.2 rc remove interface decls
Since vendors here add additional services to this service,
vts_ibase_test fails on some devices. This test, for sanity,
requires that if a service has any interface declaration, it has
all relevant interface declarations. These interface entries are
declared but unused here.

Fixes: 152375928
Test: vts_ibase_test on sargo
Change-Id: I2d3225b42824f0befb55d8c93a578e910a05e4a1
2020-04-03 15:58:29 +00:00
Valerie Hau
28fcdf27e4 Merge "Relax constraints on getting PlaneLayouts" into rvc-dev 2020-03-31 22:59:27 +00:00
Valerie Hau
2229623f1f Relax constraints on getting PlaneLayouts
PlaneLayouts may only be known at allocation time.

Bug: 152806713
Test: build, boot
Change-Id: Ic878943b405469a70a685a895c04a1d4e2678686
2020-03-31 13:47:54 -07:00
TreeHugger Robot
fa8e5f931a Merge "gralloc4-vts: fix Lock_YCBCR_420_888 test" into rvc-dev 2020-03-31 03:57:42 +00:00
Jiyong Park
aa13c7e985 Update the current API dump
All aidl_interface modules should by default considered as stable, in
case it is used across system and vendor partitions, or across modules.
Like other API surfaces, we need to have a dump for the current
(yet-to-be-released) version and update it when there is an API change.
This is done via .

Then the owner of the interface can freeze the current version as a
numbered version via .

This change shal be rejected only when the owner is certain that the
interface is not used across the updatable boundaries.

Bug: 152655547
Test: m
Change-Id: If547945d3bc8c8a73e2341ff9e90025ac10ce662
2020-03-30 14:58:16 +09:00
Marissa Wall
77b837f0ad graphics: update OWNERS
marissaw@ is leaving. jessehall@ is on a different team. Remove
them and add new owners.

Test: Compiles
Bug: 150462113
Change-Id: I922710de701d3923268591bcb48db3e12acb0500
(cherry picked from commit 88417a586b)
2020-03-26 19:31:56 +00:00
Jason Macnak
34445d98ed gralloc4-vts: fix Lock_YCBCR_420_888 test
Updates Cb and Cr plane indexing. The existing code seems to use
chromaStep as a sub-sampling factor and seems to assume that the
underlying format is tri-planar.

Updates Cb and Cr value checking. The existing code would write
values into the Cb and Cr planes using a value derived from
even-x-value and odd-y-value full-image-coordinates (e.g. (0,1))
but then check against the values in the Cb and Cr planes using
a value derived from even-x-value and even-y-value coordinates
(e.g. (0,0)).

Updates y-plane sample increment check to confirm that it is
multiple of 8. I don't see any requirements stating this needs
to be 32 bits.

Bug: b/146515640
Test: VtsHalGraphicsMapperV4_0Target
Change-Id: Ia9e496ae43b2d1ac9ea8d57a4d4fc55f0be7b2b6
2020-03-26 08:56:29 -07:00
Steven Moreland
d9eb0d743c graphics common: fix AIDL BufferUsage calculation
This was hitting integer sanitization, which we are trying to turn on:
Before:
    VENDOR_MASK_HI = -65536L,
After:
    VENDOR_MASK_HI = -281474976710656L,

Bug: 148149098
Test: manually check output (see above).
Change-Id: I1e2d7c0225aec8bf67375eb6b0cdc919b4ece847
2020-03-20 15:55:22 -07:00
TreeHugger Robot
ae7e3c0765 Merge "Remove duplicated comment section" into rvc-dev 2020-03-13 20:41:29 +00:00
TreeHugger Robot
68dbdf4a48 Merge "gralloc4-vts: fix GetLargeReservedRegion test" into rvc-dev 2020-03-10 23:05:49 +00:00
Valerie Hau
9fe0114a33 Merge "vts: VtsHalGraphicsMapperV2_1TargetTest fixup's" into rvc-dev 2020-03-10 21:21:21 +00:00
Jason Macnak
c1b5b52c70 gralloc4-vts: fix GetLargeReservedRegion test
The existing test never assigns a handle to bufferHandle so
mGralloc->getReservedRegion() will always be called with
nullptr and will always return with BAD_BUFFER.

Bug: b/146515640
Test: VtsHalGraphicsMapperV4_0Target
Change-Id: I85dac94956c6b9db5b4a19faeb16fc947f7457e1
2020-03-10 13:39:49 -07:00
Jason Macnak
b3c511d51d Remove duplicated comment section
The comment section about vendor extensions is already on lines
330-336 and should not appear inside the comment about a specific
non-vendor extension format.

Bug: b/151105493
Test: n/a
Change-Id: I0559b3157f21e2ab23d8c4a53d2a0d74ebb40561
2020-03-10 11:41:01 -07:00
Pierre Couillaud
9894812dd1 vts: VtsHalGraphicsMapperV2_1TargetTest fixup's
1) handles allocated through 'allocate' should be removed through
   'freeBuffer'.

2) make use of intended buffer handle in GetTransportSizeBadBuffer.

Bug: 146444563
Test: build, boot, VtsHalGraphicsMapperV2_1TargetTest
Change-Id: I6c1a67fc36dbc653ec2ada6a335d685d21e82800
Signed-off-by: Pierre Couillaud <pierre.couillaud@broadcom.com>
2020-03-10 08:33:01 -07:00
TreeHugger Robot
42a5bfd93d Merge "graphics-common: fix documentation typo" into rvc-dev 2020-03-09 23:05:23 +00:00
Marissa Wall
4c23d2faaf graphics-common: fix documentation typo
Bug: 149049926
Test: Compiles

Change-Id: I21d264376c09bcfd4394819245aa8284d0710633
2020-02-28 17:52:54 +00:00
Marissa Wall
67829613c0 gralloc4-vts: RGBA_8888 sampleIncrementInBits should be 32
SampleIncrementInBits is the delta between samples not components.
It should be 32 for RGBA_8888.

Test: VtsHalGraphicsMapperV4_0
Bug: 150461327

Change-Id: Idf283b93cd0243fa33eabac23185c513825d83ca
2020-02-28 17:43:46 +00:00
Marissa Ikonomidis
a66c632f8f Merge "gralloc4-vts: don't wait on invalid sync fence" into rvc-dev 2020-02-26 18:05:47 +00:00
Marissa Ikonomidis
f1b3ea2398 Merge "gralloc4-vts: correctly instantiate std::optional" into rvc-dev 2020-02-26 18:05:06 +00:00
TreeHugger Robot
15f12a26fb Merge "composer: vts: check that refresh rate stays the same on inactivity" into rvc-dev 2020-02-26 10:11:31 +00:00
Ady Abraham
9c1d0adb3f composer: vts: check that refresh rate stays the same on inactivity
Bug: 147890947
Test: adb shell data/nativetest64/VtsHalGraphicsComposerV2_4TargetTest/VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I9e1bc1325701ca1603251cc499712f11aa86d30e
2020-02-25 17:44:31 -08:00