Commit graph

7 commits

Author SHA1 Message Date
Yiwei Zhang
854a9186df gralloc: hide AIDL metadata for gralloc0-only build if requested
This is needed for ARC-R container targets using arc-cros-gralloc.

Meanwhile, bump -std=c++14 to -std=c++17 for std::optional and others.

Bug: b/433317686
Test: chromium CI + android CI
Change-Id: Id9ed5f27f6788ca63d0bdb9566c54b3cd4030e16
2025-09-10 15:40:18 -07:00
Dominik Behr
1a29f8b3da cros_gralloc: AIDL fixes for pixelformats and getMetadata
- fix return values for getArmMetadata
- add some understanding of new AIDL pixelformats

Bug: b/388092228, b/397712115, b/377616165
Test: boot corsola with AIDL gralloc/stable c mapper
Flag: EXEMPT desktop-only

Change-Id: I66b2ec6af7227cfb4c92e9459aeeee00aaa14b8f
2025-04-21 16:47:40 -07:00
Dominik Behr
a1e715acd8 cros_gralloc: add support for mt8186
Add build changes for mt8186.
Add ARM metadata types: compression, plane fds and data type.
Add mediatek_drm.h which is not available.

Bug: 388092228
Test: boot corsola with minigbm gralloc/mapper

Change-Id: I1f1e8a57f37e26694320c3ddee01fbad453f854b
2025-03-27 19:25:18 -07:00
Jason Macnak
92eb16bb24 gralloc: Move buffer metadata accessing into cros_gralloc_buffer
... to hide cros_gralloc_buffer_metadata from the AIDL/HIDL Apis.
No functional change expected.

Bug: b/321158178
Test: vts -m VtsHalGraphicsAllocatorAidl_TargetTest
Test: vts -m VtsHalGraphicsMapperV4_0Target
Test: vts -m VtsHalGraphicsMapperStableC_TargetTest
Change-Id: I33f17670a331385b0afe0e179cab8985b7fe78b9
2024-01-23 13:52:17 -08:00
Jason Macnak
bd616875b5 gralloc: Move buffer metadata initialization into common layer
... to dedup and support upcoming change to metadata initialization.

Bug: b/321158178
Test: vts -m VtsHalGraphicsAllocatorAidl_TargetTest
Test: vts -m VtsHalGraphicsMapperV4_0Target
Test: vts -m VtsHalGraphicsMapperStableC_TargetTest
Change-Id: Ib00873babcb2ec8816b0d319e675d6884594f618
2024-01-23 13:52:14 -08:00
Jason Macnak
1f9a351e4f gralloc: Use std::shared_ptr for cros_gralloc_driver
... to ensure the lifetime of the underlying cros_gralloc_driver
matches those of the various Mapper* interfaces. Without this, the
the destruction of the static cros_gralloc_driver `s_instance`
could race with a potential CrosGralloc4Mapper user on another
thread which is still alive at the time of exit() (for example,
a buffer being cleaned up on a libhwbinder worker thread).

Bug: b/300616292
Bug: b/300194143
Bug: b/294661992
Test: launch Cuttlefish, run SurfaceFlinger_test, inspect
      tracing around lifetime of cros_gralloc_driver
Change-Id: Id8e2dbff471c03f7b663952524905a06cc03fbc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4897926
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
2023-09-28 17:11:55 +00:00
Jason Macnak
fe5c2c0171 gralloc: Upstream AIDL allocator, stablec mapper, and sepolicy
... from various developments in AOSP.

Bug: b/225198076
Test: n/a
Change-Id: I65c340cfee4a3ad3c6545f365ca60249fd338a5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4897925
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
2023-09-28 17:11:53 +00:00