Commit graph

307 commits

Author SHA1 Message Date
Treehugger Robot
534c5eeea3 Merge "Revert "graphics: improve preloading for IMapper default impl"" am: aab958fef0 am: 3ce3ee6427 am: d95f1801c7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2497376

Change-Id: I1562de76110f9d938f00e3c603f6a2cf69e19a14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 20:57:13 +00:00
Chia-I Wu
7ca92515be Revert "graphics: improve preloading for IMapper default impl"
This reverts commit 6d189b71a2.

Reason for revert: b/273884219, beagle_x15

Change-Id: I9706fc46f9aedbeb4bbcff7ebcb45939bcd20680
2023-03-20 16:36:56 +00:00
Chia-I Wu
34eece60f5 Merge "graphics: improve preloading for IMapper default impl" am: 960c33c599 am: 697fddee77 am: 227a9f4155
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2459229

Change-Id: Ic80d75ea9db96d5dce2dd86942bddbecb0c5cd74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 21:06:57 +00:00
Chia-I Wu
6d189b71a2 graphics: improve preloading for IMapper default impl
When GraphicBufferMapper::preloadHal dlopens the default impl, make sure
the gralloc module is also dlopen'ed.

Bug: 269664560
Test: android.view.cts.PixelCopyTest#testVideoProducer on grunt

Change-Id: I57418338d5212fb9a2c1ea82eba63d855f69ff32
2023-02-27 14:19:12 -08:00
Alec Mouri
bedde5e845 Check the correct sysprop for P010 support for gralloc 3 and 4. am: 960c14db22
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2441523

Change-Id: I86b2df035255b94e8a682c1870efea0df450aec4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-18 02:10:40 +00:00
Alec Mouri
960c14db22 Check the correct sysprop for P010 support for gralloc 3 and 4.
We need to check the first api level that the vendor shipped with.

Also check P010 support in the preamble of the relevant test rather than in allocate(), since otherwise either allocate() may incorrectly skip some tests or allocate() may succeed but with the wrong layout information.

Bug: 257442231
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I00ae5aa01117704158c38f0689e91df99473e208
Merged-In: I00ae5aa01117704158c38f0689e91df99473e208
2023-02-16 23:16:14 +00:00
Alec Mouri
78d76ea43f Check the correct sysprop for P010 support for gralloc 3 and 4.
We need to check the first api level that the vendor shipped with.

Also check P010 support in the preamble of the relevant test rather than in allocate(), since otherwise either allocate() may incorrectly skip some tests or allocate() may succeed but with the wrong layout information.

Bug: 257442231
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I00ae5aa01117704158c38f0689e91df99473e208
2023-02-15 02:37:49 +00:00
Yi Kong
0214404f6e Fix compiler warning discovered by clang-r484482 am: 07448c2929 am: ba993e51e8 am: 661d9018c7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2402792

Change-Id: I195de8f952c0b9091e4e57d64535e4e2014f3fb5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 20:10:23 +00:00
Yi Kong
07448c2929 Fix compiler warning discovered by clang-r484482
external/googletest/googletest/include/gtest/gtest.h:1545:11: error: invalid operands to binary expression ('const std::vector<unsigned char>' and 'const android::hardware::hidl_vec<unsigned char>') [clang-diagnostic-error]
  if (lhs == rhs) {
      ~~~ ^  ~~~

Test: presubmit
Change-Id: Iabe98a58d5dc5b9943c38240da2d8df6ac61fb7f
2023-01-26 01:23:03 +09:00
Devika Krishnadas
e794f8f5e4 Merge "gralloc4-vts: Remove assert for sizeInBits for RAW formats" 2023-01-20 20:57:09 +00:00
Treehugger Robot
7603d62a20 Merge "Drop <name>I</name> from mapper HAL." am: d2bbda8b32 am: 116ddaf033 am: 81f4ddd0c5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2392038

Change-Id: Ieb1ffe7a2a24c93b6696acd9d9c178475b826aef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-20 18:54:25 +00:00
Treehugger Robot
d2bbda8b32 Merge "Drop <name>I</name> from mapper HAL." 2023-01-20 17:10:47 +00:00
Yifan Hong
ccb250d550 Drop <name>I</name> from mapper HAL.
libvintf now supports empty interface names for native HALs.

Test: TH
Bug: 264267049
Change-Id: Ie525478631e785ce8b9d813d08b0a92331047ced
2023-01-17 15:23:32 -08:00
Devika Krishnadas
7f3f32177b gralloc4-vts: Remove assert for sizeInBits for RAW formats
sizeInBits for components in RAW formats do not have to be invalid even if the bits are not contiguous.

Bug: 265348037
Test: atest VtsHalGraphicsMapperV4_0TargetTest

Change-Id: I69f58226e988c20b8ba5499ffec4fa0e2b2a68df
Signed-off-by: Devika Krishnadas <kdevika@google.com>
2023-01-13 00:28:04 +00:00
Treehugger Robot
ad6f10ae9f Merge "Clarify format BLOB locking" am: 66cf51232c am: c764d58ed8 am: 36c65361a0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2381019

Change-Id: I475aa5d0f415480aa1d9d8c599c55c4c8c0dceaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-12 07:32:53 +00:00
John Reck
0c1a059f01 Clarify format BLOB locking
Bug: 162571907
Test: n/a doc only change
Change-Id: I3ab26cee8a790067447781e13062c62fc3b7c01c
2023-01-10 11:25:56 -05:00
John Reck
741ffc2fd8 Merge "Add a README and a standardizable VERSION" am: a74147236c am: 313e0cec86 am: f42300352e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2375176

Change-Id: I68e182beadfeaa8cb932a8fab501812cca694294
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-09 20:36:39 +00:00
John Reck
0124abc1e9 Add a README and a standardizable VERSION
* Changes the compatbility matrix version to 5.0 & marks optional
* Tweaks the interface name in case it doesn't get removed soon
  (otherwise readme looks silly)
* Adds a README.md to mapper/stable-c
* Adds VTS test to validate versions match

Test: build + mapper VTS

Change-Id: I9b1256e07aaf2876d579a5487d2051c60097fb70
2023-01-06 17:40:16 -05:00
John Reck
2b3eccb904 Merge "Add stride query" am: 0797e36036 am: 04d190b3c8 am: 2e7c541ebe
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2360899

Change-Id: I58bfee442be24701d7ae2e98cacb4e34b1b1b219
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-06 20:57:54 +00:00
John Reck
2c2cfc9341 Add stride query
Fixes: 261856851
Test: VtsHalGraphicsMapperStableC_TargetTest

Change-Id: Ib49df2d46dd55848c4854179bd6205c86c232a6d
2023-01-04 16:41:26 -05:00
John Reck
0e4732c1a5 Adjust IMapperMetadataTypes.h to match gralloc4 encoding
Specifically include the header encoding. Initially
omitted as it's a bit redundant, the value in having
bit-for-bit identical encoding between gralloc4 &
imapper5 seems worthwhile enough to keep it.

Test: impltests + VtsHalGraphicsMapperStableC
Change-Id: Iee37bb97acf40362c301a06f9118938b1a0c2cd9
2022-12-15 13:50:07 -05:00
John Reck
749f5af092 Add some more tests & tweak spec around SMPTE2094-40
Test: this
Change-Id: If7c549b8efcf490859f10c225a700188b76a54fa
2022-12-15 13:49:55 -05:00
John Reck
800d77ccae Add libui requirements
Test: make
Change-Id: I78a3a7239b07976ad1ab0fc89c017a1defee2587
2022-12-13 18:44:37 -05:00
John Reck
606e156ed9 Merge "Add ABI check to IMapper5" 2022-12-09 19:13:05 +00:00
John Reck
5868a0de40 Merge "Adjust IMapperMetadataTypes.h to match gralloc4 encoding" 2022-12-08 22:02:22 +00:00
Marc Kassis
9c428fe3ed graphics.common V3 -> V4
Bug: 251177105
Test: m
Change-Id: I816b8e14a0741402090cdc4732c2a904e830ff4e
Merged-In: I1cb84ec85f98789d0737207a1661b39a25538c96
Merged-In: I2e1561f4ccb59a2a833af9a7afd07840ab2ebfa4
2022-12-07 10:53:12 +00:00
John Reck
97f313746f IMapper 5 - the Stable C approach
Test: make VtsHalGraphicsMapperStableC_TargetTest VtsHalGraphicsAllocatorAidl_TargetTest

Change-Id: I910b27f388e3fb7261425dd4b2133885c05edd37
Merged-In: I910b27f388e3fb7261425dd4b2133885c05edd37
2022-12-01 17:37:59 +00:00
John Reck
c1e4c064b3 Add ABI check to IMapper5
Bug: 254345788
Test: Make change, verify build fails
Change-Id: Ib97b26f1483293b0461c47184ae39c48b9404b0f
2022-11-30 18:13:06 -05:00
John Reck
ae73a6ebd5 Add some more tests & tweak spec around SMPTE2094-40
Test: this
Change-Id: If7c549b8efcf490859f10c225a700188b76a54fa
2022-11-28 19:53:12 -05:00
John Reck
fc21e8b3ef Adjust IMapperMetadataTypes.h to match gralloc4 encoding
Specifically include the header encoding. Initially
omitted as it's a bit redundant, the value in having
bit-for-bit identical encoding between gralloc4 &
imapper5 seems worthwhile enough to keep it.

Test: impltests + VtsHalGraphicsMapperStableC
Change-Id: Iee37bb97acf40362c301a06f9118938b1a0c2cd9
2022-11-22 15:30:28 -05:00
John Reck
48c546c7e9 IMapper 5 - the Stable C approach
Test: make VtsHalGraphicsMapperStableC_TargetTest VtsHalGraphicsAllocatorAidl_TargetTest

Change-Id: I910b27f388e3fb7261425dd4b2133885c05edd37
2022-11-18 11:20:00 -05:00
Steven Moreland
eaa8469b7c Merge "graphics.common V3 -> V4" 2022-11-02 21:21:29 +00:00
Treehugger Robot
344f7933ed Merge "Update OWNERS" am: 0ea6e013ef am: 91b8d6b035 am: 27ae2a7bef
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2282841

Change-Id: I99f6ab3a12e225cacbbaeffc9d28cd5b9451d3f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-02 20:40:19 +00:00
John Reck
15703c76af Update OWNERS
Remove all subfolder OWNERS in favor of single top-level
Update top-level OWNERS

Fixes: 230785548
Test: n/a

Change-Id: I9e4f4fa7938e31f0caf864836889f8ebb5ca5675
2022-11-02 12:36:41 -04:00
Steven Moreland
ed27779d14 graphics.common V3 -> V4
Bug: 251177105
Test: builds
Change-Id: I1cb84ec85f98789d0737207a1661b39a25538c96
2022-10-29 00:51:21 +00:00
Sally Qi
a1c66a2993 Add cc_defaults wrapper for android.hardware.graphics.allocator ndk
package.

- to avoid manually rev up if needed.

Bug: 243429120
Test: builds
Change-Id: I25bfcc203cda61af308c37c3766fa9efe6c6784c
Merged-In: I25bfcc203cda61af308c37c3766fa9efe6c6784c
2022-10-20 18:27:12 -04:00
Jason Macnak
a01e5689ed Merge "Support P010 with Gralloc2 on Gralloc1 passthrough" am: 89142b4935 am: 96ee08d953 am: a0f7f8486e am: 68dc613d33 am: 8f0d5f67c8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2208777

Change-Id: I7082256539c21ec1fa8a70f679a9b46754638899
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-15 17:53:51 +00:00
Jason Macnak
866abc15d9 Support P010 with Gralloc2 on Gralloc1 passthrough
... by updating the toYCbCrLayout function to more closely follow
the requirements found in the comments of `android_flex_plane_t`.

Bug: b/244411455
Test: untested.
Change-Id: I1173253e25583336bf480160d4f6ac9f72882971
2022-09-14 13:10:22 -07:00
Sally Qi
0435c6b4f3 Add cc_defaults wrapper for android.hardware.graphics.allocator ndk
package.

- to avoid manually rev up if needed.

Bug: 243429120
Test: builds
Change-Id: I25bfcc203cda61af308c37c3766fa9efe6c6784c
2022-09-01 13:28:00 -07:00
Sally Qi
784c253a05 Add cc_defaults as wrapper for graphics composer/common AIDL
interfaces.

- Add new Android.bp in graphics folder and wrap composer and common
  AIDL in to separate cc_defaults.
- remove composer3 dependency from allocator's VTS .bp file.

Bug: 243429120
Test: builds
Change-Id: Ia91e4ab87b7ac86248094317185b317d5604e654
2022-08-26 15:18:42 -07:00
ramindani
b2b747ffd4 [VTS] Update allocator name for AIDL allocator.
We used "default" value for the allocator in the test
and this value was used as is for the AIDL allocator.
This caused the test to fail because we were not able to acquire the
appropriate allocator as AIDL allocator instance is not named "default".
Update the test to use the correct instance name for AIDL allocator,
if available.

Test: atest VtsHalGraphicsComposerV2_1TargetTest
atest VtsHalGraphicsComposerV2_2TargetTest
atest VtsHalGraphicsComposerV2_3TargetTest
atest VtsHalGraphicsComposerV2_4TargetTest
atest VtsHalGraphicsComposer3_TargetTest
BUG: 234671596

test results after updates:
VTS 2.1 : http://ab/I84600010058657636
VTS 2.2 : http://ab/I51800010058498973
VTS 2.3 : http://ab/I87700010058914863
VTS 2.4 : http://ab/I88900010058592031
VTS 3.0 : http://ab/I96200010058838905

Change-Id: I04ae1a18d757cfd941d4929ad08f6bb2c8643f76
2022-06-07 23:33:12 +00:00
Alec Mouri
38ccfd7a29 Tweak IMapper 4.0 VTS to run with AIDL IAllocator
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-23 18:38:37 +00:00
Jason Macnak
895d411403 Update Mapper4 SetBadMetadata VTS test for optional metadata
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-05-11 22:25:28 +00:00
Alec Mouri
18339992dd Allow old gralloc implementations to skip P010 support.
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-04-06 19:00:23 +00:00
Leon Scroggins III
cd5e469831 Add isSupportedNoFailure and call in IsSupportedR8
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-02-17 08:54:43 -05:00
Ray Essick
d1374e051c Add explicit apex_available clauses
add apex_available clauses to interfaces which were being allowed
by list stored within the apex toools

Bug: 215589022
Test: build
Change-Id: Iaf5d1b80e6b35f765d6b7a59ce7f28d4fa5098a4
2022-02-09 09:28:53 -08:00
TreeHugger Robot
9138a1382c Merge "Make retrieving SMPTE2094-10 metadata optional." 2022-01-24 23:33:39 +00:00
Alec Mouri
9324749747 Make retrieving SMPTE2094-10 metadata optional.
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-24 21:42:13 +00:00
Leon Scroggins III
5f78f65e8f Test that R_8 can be allocated if it's supported
Bug: 209458105
Test: atest VtsHalGraphicsMapperV4_0TargetTest (this)
Change-Id: I927393bf9e4186d400e8b7cc0758095ec00ef13f
2022-01-19 16:26:35 -05:00
Treehugger Robot
3eccaa7d23 Merge "Backfill OWNERS for VtsHalGraphicsMapper tests." am: cd6ab41533 am: eeaedb225d am: fedf81818a am: 5db4d85b44 am: 23e8d9ecf9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1858914

Change-Id: If6b8aab0f77ffa0d4fcd1a99f6431b8a053a19d1
2021-10-18 18:56:32 +00:00