summaryrefslogtreecommitdiff
path: root/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
AgeCommit message (Collapse)Author
2022-05-23Tweak IMapper 4.0 VTS to run with AIDL IAllocatorAlec Mouri
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-11Update Mapper4 SetBadMetadata VTS test for optional metadataJason Macnak
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-04-06Allow old gralloc implementations to skip P010 support.Alec Mouri
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-02-17Add isSupportedNoFailure and call in IsSupportedR8Leon Scroggins III
The upper layers will treat this failure as a lack of support, so make the test do the same. This allows the test to pass on flame. Bug: 219606432 Test: atest VtsHalGraphicsMapperV4_0TargetTest Change-Id: I57eab60de81989cae59baa8c25b53a1c94229187
2022-01-24Merge "Make retrieving SMPTE2094-10 metadata optional."TreeHugger Robot
2022-01-24Make retrieving SMPTE2094-10 metadata optional.Alec Mouri
Devices that do not support this metadata are not required to support getting or setting it on gralloc buffers, as SMPTE2094-10 is only used for some HDR standards that are not guaranteed to be supported. Bug: 205245993 Test: builds Change-Id: Ic3501230015ddce49ce977963356c0578af7c50f
2022-01-19Test that R_8 can be allocated if it's supportedLeon Scroggins III
Bug: 209458105 Test: atest VtsHalGraphicsMapperV4_0TargetTest (this) Change-Id: I927393bf9e4186d400e8b7cc0758095ec00ef13f
2021-10-07Add gralloc VTS for SMPTE 2094-10 metadataAlec Mouri
Bug: 200309502 Test: VtsHalGraphicsMapperV4_0TargetTest Change-Id: If1f3d99b70226f609f6cdbd05a790de0fb05d006
2021-06-23Add test in VTS MapperV4 for YCbCr_P010ramindani
Fixed comments. Test: atest VtsHalGraphicsMapperV4_0TargetTest BUG=181069130 Change-Id: I7c4f8edc20e8772c4a393b03e934868a0b963b2b Change-Id: Idba57d496051f6a4f92748267e4ae4b13f8f98fb
2020-08-31Mark GraphicsMapperHidlTest as allowing not being instantiatedChris Forbes
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-06-23Merge "Add test for subsample metadata for YUV420 format" into rvc-devTreeHugger Robot
2020-06-20Add test for subsample metadata for YUV420 formatlayog
Bug: 153704651 Test: atest VtsHalGraphicsMapperV4_0TargetTest Change-Id: Ie7a521b19b2eb1c459327fe699253aaa50ae8257
2020-06-16gralloc4-vts: Correct the ownership of fence fdYichi Chen
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-08gralloc4-vts: Test metadata is consistent in cloned buffersYichi Chen
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-08gralloc4-vts: Test layout and component info of RAW12layog
Bug: 157534008 Test: VtsHalGraphicsMapperV4_0TargetTest Change-Id: I3441e630b18f3d6e0f5cbcecf8a54dc1b42faa84
2020-06-08gralloc4-vts: Test layout and component info of RAW10Yichi Chen
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-05-21gralloc4-vts: Allow getFromBufferDescriptorInfo return unsupportedYichi Chen
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-12gralloc4-vts: Hold fence by unique_fd to avoid leakageYichi Chen
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-12gralloc4-vts: Restore Lock_YCBCR_420_888 and create Lock_YV12Yichi Chen
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-12gralloc4-vts: Extract YCbCr888 data operation from Lock_YCRCB_420_SPYichi Chen
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-12gralloc4-vts: Allow YCRCB_420_SP to be unsupported in Lock_YCRCB_420_SPYichi Chen
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-08Fix Mapper Protected testValerie Hau
Bug: 155942443 Test: build, boot Change-Id: Ie258184981615d714878b108f2e00452fbf95358
2020-04-10gralloc4-vts: Correct plane layout test of RGBA_8888 and YCbCr_420Yichi Chen
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-03-31Merge "Relax constraints on getting PlaneLayouts" into rvc-devValerie Hau
2020-03-31Relax constraints on getting PlaneLayoutsValerie Hau
PlaneLayouts may only be known at allocation time. Bug: 152806713 Test: build, boot Change-Id: Ic878943b405469a70a685a895c04a1d4e2678686
2020-03-31Merge "gralloc4-vts: fix Lock_YCBCR_420_888 test" into rvc-devTreeHugger Robot
2020-03-26gralloc4-vts: fix Lock_YCBCR_420_888 testJason Macnak
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-10gralloc4-vts: fix GetLargeReservedRegion testJason Macnak
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-02-28gralloc4-vts: RGBA_8888 sampleIncrementInBits should be 32Marissa Wall
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-26Merge "gralloc4-vts: don't wait on invalid sync fence" into rvc-devMarissa Ikonomidis
2020-02-26Merge "gralloc4-vts: correctly instantiate std::optional" into rvc-devMarissa Ikonomidis
2020-02-25gralloc4-vts: don't wait on invalid sync fenceMarissa Wall
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
2020-02-25gralloc4-vts: correctly instantiate std::optionalMarissa Wall
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
2020-02-25gralloc4-vts: fix bad comparisions in VTSMarissa Wall
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
2020-02-20gralloc4-vts: setting USAGE is always BAD_VALUEMarissa Wall
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
2020-02-13gralloc4-vts: return after GTEST_SUCCEEDMarissa Wall
GTEST_SUCCEED() does not cause a GTEST to return. Insert a return after every GTEST_SUCCEED(). Test: VtsHalGraphicsMapperV4_0 Bug: 149008032 Change-Id: I65637e7a0ac9a9ac8d69c9d8ccbb427543d82428
2020-02-13gralloc4-vts: update sampleIncrementInBitsMarissa Wall
sampleIncrementInBits is per sample not per component. An RGBA sample is 32 bits not 8. Test: VtsHalGraphicsMapperV4_0 Bug: 149310539 Change-Id: If4bd5aac87cada7040f52ee40159a72fa72a97be
2020-02-10gralloc4: fix SetConstantMetadata and SetBadMetadataMarissa Wall
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
2020-02-10gralloc4: move crop to seperate metadata typeMarissa Wall
Move crop out of PlaneLayout so it can be set and get independently from PlaneLayout. Bug: 141632767 Test: atest VtsHalGraphicsMapperV4_0 Change-Id: Ib685c0a065754e3e3bd697d3518b03b4c76d447e
2019-12-18Add HDR metadata types to graphics/commonPawin Vongmasa
Bug: 120990898 Bug: 141632767 Test: Builds Change-Id: Ie37b38043ec4c015bbe439978a0344d4c6bbc124
2019-12-18Merge "Add BT709 with full range."TreeHugger Robot
2019-12-17Revert submissionJoseph Murphy
Reason for revert: Buildcop - Build breaking references to std::optional Change-Id: I8595ca0a668bc7e3684bc7f7a1424a6905d3b547
2019-12-16Add BT709 with full range.Peiyong Lin
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
2019-12-16Add HDR metadata types to graphics/commonPawin Vongmasa
Bug: 120990898 Bug: 141632767 Test: Builds Change-Id: I94a592d1cc0854b37622a2c85575083b59803793
2019-12-16gralloc4: remove dumpDebugInfoMarissa Wall
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
2019-12-12Merge "gralloc: use gralloctypes helper"TreeHugger Robot
2019-12-10Convert VtsHalGraphicsMapperV4_0TargetTest to be parameterized testDan Shi
Bug: 142397658 Test: atest VtsHalGraphicsMapperV4_0TargetTest Change-Id: I3854f9d4e601d37952e41a5c503f3b1d833c47a5
2019-12-10gralloc: use gralloctypes helperMarissa Wall
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
2019-12-09Merge "gralloc: add flush and reread for locked buffers"TreeHugger Robot
2019-12-09gralloc: add flush and reread for locked buffersMarissa Wall
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