Commit graph

153 commits

Author SHA1 Message Date
Dan Shi
ba894f81db 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 15:17:02 -07:00
Pierre Couillaud
49f262471d 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

Cherry pick to master from android10-tests-dev

Change-Id: I6c1a67fc36dbc653ec2ada6a335d685d21e82800
Merged-In: I6c1a67fc36dbc653ec2ada6a335d685d21e82800
Signed-off-by: Pierre Couillaud <pierre.couillaud@broadcom.com>
2020-03-11 15:40:46 +00:00
mtk07406
e308ceb1e9 Fix VTS fail for GraphicsMapperHidlTest
VTS_10 testing item VtsHalGraphicsMapperV2_1Target fail due to
Gralloc0 HAL do not have return value : BAD_VALUE and BAD_BUFFER
so add Error::BAD_VALUE and Error::BAD_BUFFER as return value to
fix this VTS fail.

Bug: 146034198
Test: ran VtsHalGraphicsMapperV2_1Target 10 times and it all pass.
Change-Id: I792830ddf98cbf59de7d3a7b4dd4cf5f72269244
2020-02-14 10:25:19 +08:00
Dan Shi
5a955bc176 Convert VtsHalGraphicsMapperV*TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalGraphicsMapperV2_0TargetTest \
  VtsHalGraphicsMapperV2_1TargetTest \
  VtsHalGraphicsMapperV3_0TargetTest

Change-Id: I1d4e222f3a04882ae8d74e79201c2751d1d22ea4
2019-12-06 16:05:11 -08:00
Treehugger Robot
9b2431d02a Merge "Refine freeBuffer in Mapper 2.0" 2019-10-08 23:17:06 +00:00
Alistair Delva
b756e23e5c Merge "Make gralloc0 pass-through mapper handle layers" 2019-10-03 13:02:13 +00:00
Jason Macnak
8b5b9fb52c Make gralloc0 pass-through mapper handle layers
Gralloc0 does not support layers. This change is needed for Cuttlefish
to pass the GraphicsMapperHidlTest.ValidateBufferSizeBadValue VTS test

Bug: b/132087346
Test: vts-tradefed run commandAndExit vts -m VtsHalGraphicsMapperV2_1Target
Change-Id: I2ed7dae209629d401ccaf2fc0fd992d766b0fa9b
2019-09-27 09:58:45 -07:00
Max Zhang
59b31c9b90 yukawa: adapt different YCC orders
The order of the planes doesn't matter, therefore enable mapper
adapter to support YCbCr and YCrCb both.

test: manual
bug: 141006723
Change-Id: Iad0d5159c1b38b12bc90a07f937db002471aad1e
2019-09-24 11:38:07 -07:00
Eric Chung
a15f697353 Refine freeBuffer in Mapper 2.0
When users call Mapper:freeBuffer, Mapper will erase buffer handle from mBufferHandles.
No matter the result of free buffer handle returned from gralloc, buffer handle is removed from mBufferHandles.
This means that a buffer handle can not be freed twice, even if it fail to be freed at the first time.
Because users will receive nullptr when they call freeBuffer to free the same bufferHandle at the second time.

When freeBuffer is called, Mapper only looks for input buffer in mBufferHandles instead of erasing it from mBufferHandles.
If the result of freeBuffer returned by gralloc is NONE, then remove the buffer handle from mBufferHandles.

Test: Manual
Bug: 141145482

Change-Id: I4e27f54eb219f23a5844d6b440d7160b296c31e2
2019-09-17 01:12:06 +00:00
Steven Moreland
b3a4d3832e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
2019-09-06 01:07:02 +00:00
Valerie Hau
624ce4b638 Merge "Adding support for different Mapper versions in IComposer VTS tests" into qt-dev
am: 29594d2d02

Change-Id: Icd7b79a0a737c2b90a79a140168c15eaf3f50457
2019-06-20 13:14:35 -07:00
Valerie Hau
dca469c180 Adding support for different Mapper versions in IComposer VTS tests
Bug: 135139498
Test: build, boot, VtsHalGraphicsComposerV2_<1,2,3>TargetTest,
Change-Id: I05e2832c64d4c06eb4afd64c3323d7edbd19a5f4
Merged-In: I05e2832c64d4c06eb4afd64c3323d7edbd19a5f4
2019-06-19 17:14:24 -07:00
Valerie Hau
86a6f6e805 Merge "Call into validateBufferSize and getTransportSize" into qt-dev
am: 85b557fd1a

Change-Id: I367da83cd2e912d623698e28a6bda09a931aa33a
2019-05-06 09:29:05 -07:00
Valerie Hau
8e3fe149e1 Call into validateBufferSize and getTransportSize
After adding validateBufferSize and getTransportSize,
call into these functions if they have been implemented

This reverts commit 5e01b1411a.
Reason for revert: Merge once targets w/ gralloc0 dependency have been updated

Bug: 130669566
Test: build, boot
Change-Id: Ic20a62c5e73f517028a358548442d59c9cf91cdf
2019-04-24 21:46:01 +00:00
Valerie Hau
c04e71b89c Merge "Revert "Call into validateBufferSize and getTransportSize"" into qt-dev
am: a7904cd342

Change-Id: Ic407f3e433505dd9b6eb1024fd85e47e508b9a42
2019-04-23 16:24:51 -07:00
Valerie Hau
5e01b1411a Revert "Call into validateBufferSize and getTransportSize"
This reverts commit 69ee26a389.

Reason for revert: Break in Elfin

Bug: 130669566
Change-Id: Ia44fd087981770676a6887aa390c674c2855f4cb
2019-04-23 22:54:59 +00:00
Valerie Hau
95072f8c52 Merge "Call into validateBufferSize and getTransportSize" into qt-dev
am: 492399e5cd

Change-Id: I1d44634b47964a8ecb741b7e60c48de9025d2b9b
2019-04-23 15:22:18 -07:00
Valerie Hau
69ee26a389 Call into validateBufferSize and getTransportSize
After adding validateBufferSize and getTransportSize,
call into these functions if they have been implemented

Bug: 130669566
Test: build, boot
Change-Id: I445cb6122107a514bc0bf433a9e140dbe3122573
2019-04-22 17:50:02 -07:00
Steven Moreland
99712c08cc Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I53e5bf67a0d314e1b10c0ba0c7172a7af358ddcc
2019-04-18 18:13:05 -07:00
Steven Moreland
6d494b2346 Merge "Update hidl makefiles for bpfmt" am: ff0bd741ca
am: 96f40f7b02

Change-Id: Idbf030e4993067bdb8181321bca2de00c9b6f7ef
2019-04-18 14:34:45 -07:00
Steven Moreland
1ae4615d9f Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
2019-04-17 09:38:50 -07:00
Marissa Wall
6952ddf596 mapper: support new usage and format
Update IMapper to use usage and format from
android.hardware.graphics.common@1.2. This enables support for
the usage HW_IMAGE_ENCODER and the format HSV_888 which is
already being defined and used.

Test: IMapper VTS tests
Bug: 79465976
Change-Id: I680beb6e5b1cd246c28d17f855f5c76a5831ce06
2019-04-10 12:29:05 -07:00
Eino-Ville Talvala
7c51e8492e graphics.mapper@2.0: Document previously-implicit accessRegion behavior.
Existing Android framework code (and transitively, CTS test) require
that an accessRegion of (0,0,0,0) is treated the same as an
accessRegion covering the entire buffer, when calling lock() or
lockYCbCr().

Document this so that there is no confusion about this going forward,
since this requirement pre-dates the HIDL HALs.

Bug: 119440345
Test: Builds
Change-Id: Id16831d3da4ec3dc74dbdca18447581a50ee1193
2019-03-28 16:51:39 -07:00
Steven Moreland
87f43604b9 Merge "Update makefies: no 'types' internal" 2019-03-05 17:40:03 +00:00
Steven Moreland
7f4e21adda Merge "Update makefies: no 'types'" am: 4ee5ec1469 am: bab622f6a6
am: 7224bc9bcf

Change-Id: I434939e0770afa436c532a945542fce30a71ef7d
2019-03-04 16:05:59 -08:00
Steven Moreland
b91ac5c6a0 Update makefies: no 'types' internal
Bug: 123976090
Test: N/A
Change-Id: I84b659b163b63d39535b462a3df8a9c19f680976
2019-03-04 14:09:25 -08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Sean Callanan
51c11c6936 Merge "mapper-passthrough: filter two usages for gralloc1" 2019-01-24 00:55:08 +00:00
Marissa Wall
a6a30b1aec mapper: add isSupported
Add a function to the mapper hal that checks if a BufferDescriptorInfo
is ever supported on a device. This value can be cached by the client.
The client can use this information to make decisions on what type of
buffers should attempt to allocate.

Bug: 120493579
Test: vts
Change-Id: I6bd7909e40d6462524bf49cf0d4e7af721e701ed
2019-01-22 22:09:59 +00:00
Marissa Wall
69292faf0b mapper: update lock's return values
Require mapper to return more information when locking a buffer.
Opaque vendor formats make it difficult to manipulate a locked
buffer. The pointer to the buffer's data is always at the top
left hand corner of the buffer. It can be impossible to know
where the locked region begins.

The mapper now must return the bytes per pixel and bytes
per stride of a locked buffer when the values are consistent
and known.

Bug: 120493579
Test: vts
Change-Id: Id0921f191f1e388d4950ecef73acab6a34010dc4
2019-01-22 22:07:10 +00:00
Marissa Wall
2f43f46211 mapper: update documentation on locking
Update the locking documentation to require all 1D buffers
"lock in place". Previously, the framework was able to get 1D
buffers that locked in place via ion. The ion interface is no
longer directly accessible. Some framework use cases still need
1D buffers that lock in place so add the requirement to mapper.

Bug: 120493579
Test: N/A
Change-Id: Ib903efdbeeb8c44ed70c3c6022d6792d05df1a63
2019-01-22 22:03:58 +00:00
Sean Callanan
fecf455068 mapper-passthrough: filter two usages for gralloc1
GPU_CUBE_MAP and GPU_MIPMAP_COMPLETE both do not exist in gralloc1,
so don't try to allocate buffers that have those usages.  Report an
error instead.

Bug: 66876469
Test: CTSNativeHardwareTestCases on Taimen
Change-Id: I1a6bd209faf5ffad93dbac0ab887bb1447a44aac
2019-01-17 16:37:40 -08:00
TreeHugger Robot
1be67b368a Merge changes from topic "IA/IM-3.0"
* changes:
  graphics: change composer 2.1 to support allocator/mapper 3.0
  graphics: rev IAllocator and IMapper
2019-01-15 23:21:27 +00:00
Marissa Wall
bd1ca51841 graphics: rev IAllocator and IMapper
Increase IAllocator and IMapper to 3.0. This patch does not add
any new features.

Bug: 120493579
Test: vts
Change-Id: I84d9887f94d91eca1cc5d845bb11ac1d8affbf62
2019-01-12 15:40:02 -08:00
Marissa Wall
889c94dabc graphics: update owners am: 104ecb9e60 am: af56d35175
am: 88d9ae03c4

Change-Id: I596f312798b61afe4a6f12d293e2de95b6e2d193
2019-01-11 10:51:25 -08:00
Marissa Wall
104ecb9e60 graphics: update owners
With olv@ no longer on the graphics team we need to update the
owners file to remove him and add new owners.

For composer the new owners are: lpy@ and vhau@
For allocator/mapper the new owner is: marissaw@

Test: N/A
Change-Id: Ied297e9446d480629155e1d9a96575ee518c2135
2019-01-10 14:27:55 -08:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Keun Soo YIM
ff84c37bc1 pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-11-27 16:11:41 -08:00
Chia-I Wu
2209bcb186 graphics: test buffer allocation for thread safety
Bug: 111604912
Test: VTS
Change-Id: I1b6cacc8d6ff5e1c145425ff6f32001090b07b06
2018-08-01 10:01:38 -07:00
Steven Moreland
cbc30e1f58 Merge "Update comments for doc comments." into pi-dev
am: cce4c95c1c

Change-Id: Id691cf973a214ee1d2f62297c13c8c030fc7a8bb
2018-05-18 18:43:45 -07:00
Steven Moreland
4ee4582230 Update comments for doc comments.
Doc comments look like "/** ... */" and they
can only be in certain places.

Bug: 79865343
Test: m
Change-Id: Ic15c08ff7dc6e4f9827c1dbe7f7236c11a572ec1
2018-05-18 10:10:32 -07:00
Marissa Wall
4fc9c90b87 Merge "graphics: add new gralloc1 functions to passthrough" into pi-dev
am: c357006160

Change-Id: I082a978faf33039e7a962810cc1aefb4c86c3343
2018-05-03 15:58:09 -07:00
Marissa Wall
facec957e3 graphics: add new gralloc1 functions to passthrough
Add calls to the new gralloc1 functions: import, validateBufferSize
and getTransportSize. These new gralloc1 functions are used for
security hardening.

Bug: 66876469
Test: Manual
Change-Id: I18e485c48e1a24352208753144d936e1117d4ccb
2018-05-03 13:48:59 -07:00
Peiyong Lin
71641ca359 Merge "[Graphics] Update CommandWriter APIs to common::V1_1::* enum." into pi-dev
am: 584ee3b94a

Change-Id: Ieb29aadc2e9034a9ff76495755d290fc0432e781
2018-04-02 22:15:30 -07:00
Peiyong Lin
a2acfa2219 [Graphics] Update CommandWriter APIs to common::V1_1::* enum.
Previously we introduced Dataspace V1.1 and PixelFormat V1.1, thus APIs
accepting Dataspace should also be updated to accept V1_1::Dataspace and
V1_1::PixelFormat.

BUG: 77156734
Test: adb shell /data/nativetest/VtsHalGraphicsComposerV2_2TargetTest/VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I00d00749f2895b727a18a28903256128a33e8b97
2018-04-02 15:56:45 -07:00
Yuexi Ma
8ef11932b9 resolve merge conflicts of 07ff5f4376 to pi-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Id636c3171bffffeaf7a30a7912c38796e5a4c780
2018-03-26 16:05:07 -07:00
Yuexi Ma
d56539e62a Update vts test module bp files to use VtsHalTargetTestDefaults
Test: make vts
Change-Id: I3c0dab52dc894e1a1fc9b99be1351ed7bd380502
Merged-In: I3c0dab52dc894e1a1fc9b99be1351ed7bd380502
2018-03-22 23:36:10 +00:00
Nathan Harold
c893754c0d Update Makefiles Missed In Previous Commits
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.

Bug: 8675309
Test: compilation
Change-Id: I5bf67fbcc809de36bde1869ada7b835566a5198b
2018-03-19 16:37:46 -07:00
Chia-I Wu
15d22137ac graphics: add a default impl for IMapper 2.1
This is for reference only.  It almost only has stub implementations
for the new 2.1 methods.

Test: boots and VTS
Change-Id: I60499f3094df1975ccbbcda7b5c03d4a0dc57c39
2018-02-02 07:31:37 +00:00
Chia-I Wu
3ceef47c41 graphics: add mapper 2.1 HAL support library
Add android.hardware.graphics.mapper@2.1-hal to make it easier to
write 2.1 HALs.

Test: builds
Change-Id: I36d6b2c85ec623240582788505f29e635960dc0e
2018-02-02 07:31:28 +00:00