OSDN Git Service

cros_gralloc: Adds gralloc 3.0 support
authorJason Macnak <natsu@google.com>
Fri, 24 Jan 2020 23:05:57 +0000 (15:05 -0800)
committerCommit Bot <commit-bot@chromium.org>
Wed, 8 Jul 2020 01:08:59 +0000 (01:08 +0000)
commit1de7f6655d09095d28ba05abab8c6f6279671c65
treeace310f1a73abd463d2bffeb930f6a8ae3036fc0
parent047df2b4e93b945e0ee1686b7d5a7c7d85397f47
cros_gralloc: Adds gralloc 3.0 support

Implements the allocator 3.0 and mapper 3.0 interfaces
which:

 - Implements HIDL interface directly (older versions
   are wrapped in a passthrough HIDL interface)

 - Adds isSupported() to allow checking for format and
   usage combination support before allocating.

Adds emulated multi-planar buffer support to virtio
backend for non gbm enabled hosts.

Updates cros_gralloc_handle to use uint64_t instead of
two uint32_t for some members.

Updates cros_gralloc_handle to have a single format
modifier.

Replaces Android makefiles with Android bp files.

BUG=b:146515640
TEST=run Cuttlefish w/ gralloc3 and run CTS tests

Change-Id: I43ed9788a2413201bddce17ffb69b76006ef39fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2273554
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
27 files changed:
Android.bp [new file with mode: 0644]
cros_gralloc/Makefile
cros_gralloc/cros_gralloc_buffer.cc
cros_gralloc/cros_gralloc_buffer.h
cros_gralloc/cros_gralloc_driver.cc
cros_gralloc/cros_gralloc_driver.h
cros_gralloc/cros_gralloc_handle.h
cros_gralloc/cros_gralloc_helpers.cc
cros_gralloc/cros_gralloc_helpers.h
cros_gralloc/cros_gralloc_types.h
cros_gralloc/gralloc0/gralloc0.cc
cros_gralloc/gralloc0/tests/gralloctest.c
cros_gralloc/gralloc3/.clang-format [new file with mode: 0644]
cros_gralloc/gralloc3/Android.bp [new file with mode: 0644]
cros_gralloc/gralloc3/CrosGralloc3Allocator.cc [new file with mode: 0644]
cros_gralloc/gralloc3/CrosGralloc3Allocator.h [new file with mode: 0644]
cros_gralloc/gralloc3/CrosGralloc3AllocatorService.cc [new file with mode: 0644]
cros_gralloc/gralloc3/CrosGralloc3Mapper.cc [new file with mode: 0644]
cros_gralloc/gralloc3/CrosGralloc3Mapper.h [new file with mode: 0644]
cros_gralloc/gralloc3/CrosGralloc3Utils.cc [new file with mode: 0644]
cros_gralloc/gralloc3/CrosGralloc3Utils.h [new file with mode: 0644]
cros_gralloc/gralloc3/android.hardware.graphics.allocator@3.0-service.minigbm.rc [new file with mode: 0644]
drv.c
drv.h
helpers.c
virgl_hw.h
virtio_gpu.c