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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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
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>
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
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>
SampleIncrementInBits is the delta between samples not components.
It should be 32 for RGBA_8888.
Test: VtsHalGraphicsMapperV4_0
Bug: 150461327
Change-Id: Idf283b93cd0243fa33eabac23185c513825d83ca
Sync fences can be invalid if the buffer is already ready. If the
fence is invalid, we do not need to wait.
Test: VtsHalGraphicsMapperV4_0
Bug: 150213134
Change-Id: I8326d5f8b358c466ee9a686fd299daed1d4b4aa8
std::optional defaults to containing std::nullopt_t. Using "->" or
"." on an std::optional object that does not contain a value is
undefined. Clang seems to ignore the whole line.
SetSmpte2086 and SetCta861_3 both incorrectly instantiate their
std::optional types. The std::optional types contain std::nullopt_t
when they are passed into encode. When mapper decodes the fields,
they are empty.
Update std::optionals to be instantiated correctly.
Bug: 149931805
Test: VtsHalGraphicsMapperV4_0
Change-Id: I046242f8261a5378228231b89b2eedec242667cb
The parameter order of a couple checks is wrong.
For example:
EXPECT_GT(val1, val2) is EXPECT_TRUE(val1 > val2)
so EXPECT_GT(0, X) can never be true.
Update the tests to be correct.
Test: VtsHalGraphicsMapperV4_0
Bug: 149739702
Change-Id: I21070a912b6014acc5feb63b6b19912b45fe8f5f
Usage cannot be change after allocation. Mapper must return
BAD_VALUE. SetConstantMetadata already tests this. Remove
the tests that attempted to set USAGE and expected it could
succeed.
Test: VtsHalGraphicsMapperV4_0
Bug: 149830560
Change-Id: I730dd3f3c0c48946c436e8fb60256365e0d9ab1e
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
GTEST_SUCCEED() does not cause a GTEST to return. Insert a
return after every GTEST_SUCCEED().
Test: VtsHalGraphicsMapperV4_0
Bug: 149008032
Change-Id: I65637e7a0ac9a9ac8d69c9d8ccbb427543d82428
sampleIncrementInBits is per sample not per component. An RGBA sample
is 32 bits not 8.
Test: VtsHalGraphicsMapperV4_0
Bug: 149310539
Change-Id: If4bd5aac87cada7040f52ee40159a72fa72a97be
SetConstantMetadata was trying to set constant metadata
with bad values. SetBadMetadata was also trying to set
constant metadata with bad values. Update SetConstantMetadata
to set constant metadata with good values. Remove constant
metadata from the SetBadMetadata test.
Bug: 149004202
Test: VtsHalGraphicsMapperV4_0
Change-Id: I6816fca64c7ac89e457628e94bc06bc1b05c916f
Move crop out of PlaneLayout so it can be set and get independently
from PlaneLayout.
Bug: 141632767
Test: atest VtsHalGraphicsMapperV4_0
Change-Id: Ib685c0a065754e3e3bd697d3518b03b4c76d447e
In order to provide a more descriptive name, and to be consistent
with HIDL, the stable AIDL package names are switching from
vintf-*common format to the package format
(android.hardware.*common).
Bug: N/A
Test: all build time
Change-Id: Ie1d92a50dddf7e3e1bd473e2a957279c6dadb865
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, passes CTS
Change-Id: I5ff86539ee28a72dd972255ad405db357e62536d
Add support for BT709 full range support with SMPTE 170M transfer function.
Minor: Remove deprecated dataspace support in aidl.
BUG: b/130737986
Test: build
Change-Id: I17b1f7d868e99396df9779bdd53d63bdcd2a06af
dumpDebugInfo could be called by anyone. A safer
approach is for processes to dump their own buffers
via IMapper's dumpBuffers.
Bug: 137966819
Test: Compiles
Change-Id: I4c8c7a6415babfb93034ee8674ba0f40cd8c1bb8
Use the gralloctypes helper function to determine if a
PlaneLayoutComponentType is a standard type. Also update the
lock RGBA_8888 function to ignore non-standard
PlaneLayoutComponentTypes.
Bug: 141632767
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: Ie3ea4a22b2c9ecf4b1d85932833978d2e23f77c1
When a buffer is locked (mapped to the CPU) by two or more clients,
there is no good way to manage a reader/writer relationship. There are
no requirements for how the writes should propagate to the readers.
Clients must unlock and relock to be sure writes are flushed.
They must unlock and relock to get the lastest copy of the buffer.
This patch adds explicit flush and reread commands to help readers
and writers synchronize without having to unmap and remap the
buffer.
Bug: 136316517
Test: TODO
Change-Id: I10d3de1b0e46c4f3b50dc34aea653701933638a9
This patch adds a reserved region of shared memory to every gralloc
native_handle_t. The reserved region of memory will allow future
versions of Android to add new buffer features without requiring
gralloc upgrades.
Bug: 145232031
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I1bdfec0a6ef85097096035d3d38e5c9e7fcc32f2
Gralloc 4 removes lockYCbCr but clients will still expect similar
functionality to lockYCbCr. This test case ensure that gralloc
will still behave sufficiently similarly when locking
YCBCR_420_888.
Bug: 141631415
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I60d2c220bab858eabe89a95b225d2816ab7289cc
Add functions to IMapper to dump a buffer and to dump all the
buffers in the current process. The dump includes
all gettable or settable metadata.
Bug: 141632317
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: Iaa54b899aef185867b3fd66025c0eb251a9a7bd1
Clean up code comments based on review comments in ag/9684750 and
ag/9684750.
Bug: 144551649
Test: Compiles
Change-Id: I96f5962d2c1b79352f85dcf9354689814310ecc0
IMapper 4.0 does support lockYCbCr functionality through lock and
BufferMetadata getters. However, we will wait to add the support in
one central gralloc library. For now just stub out the call so
there aren't any compiler errors.
Bug: 141631415
Test: Compiles
Change-Id: I9d2f70c87412f8ac2114db85eb6dc01539876e2b
Add function to get the metadata types supported by IMapper.
In future releases, we will add more standard types but upgrading
devices may not support those types. This function will allow the
framework to identify which metadata types the device supports.
Bug: 141632767
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I760cf054d2b6f08a52ad70f4ae60a39a63500939
Allow the client to name their buffer at allocation time.
b/141632767 will let the client(s) query the name of the
buffer later.
Bug: 144026910
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: Ib08c1909c10a1778c50b59e0a42ddf19140d8f03
Update lock to clarify that if the access region is outside the
bounds of the buffer, the lock call should fail.
Bug: 141631415
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: Ic9ccac9361c8cafc59660b107686d2cbb54faf2d
Clarify that buffers that are locked (mapped) to the CPU must
be in the format requested in their BufferDescriptorInfo.
The buffers should not be compressed/swizzled/tiled/etc.
Bug: 141631415
Test: This is already assumed by the tests.
Change-Id: Ie674117418aaefc3f99ac2bc89c3da4072e236ec
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
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
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
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
Rev the IAllocator/IMapper HIDL interfaces to 4.0. This patch is
a copy paste from IAllocator/IMapper 3.0.
Bug: 136016160
Test: Compiles and boots
Change-Id: Ia7f159f97fe0f812b5f0e10a850715364090883c
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