OSDN Git Service

minigbm: stop faking the protected buffers
authorGurchetan Singh <gurchetansingh@chromium.org>
Tue, 13 Oct 2020 00:31:10 +0000 (17:31 -0700)
committerCommit Bot <commit-bot@chromium.org>
Wed, 14 Oct 2020 04:32:55 +0000 (04:32 +0000)
commitbbba9dde65832cf03f1a0e9739e81e8ad689a508
tree4e211d41a4950edc078a274d81e757ed71ec2c34
parent20604bea13dbf7b2faa02b72c17ef0e65bd2a9b9
minigbm: stop faking the protected buffers

With real HW protection on the horizon, let's repurpose the
protection flag to mean that.

Currently, our protected buffer scheme on the Android side
allocates a dummy fd, which is sent to Chrome.  Chrome
associates that dummy fd with an unmappable shared memory
buffer.  In the entire process, minigbm doesn't really do
anything.

We prevent buffers allocated with the protected
flag from being mapped, but since it's a dummy fd it's not
really useful.

Chrome doesn't use the protected flag yet, but hopefully will
so in the future, but with real HW protection.

BUG=
TEST=

Change-Id: I57be26926539471f062ffeff33b523a3899c35f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2466958
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
cros_gralloc/gralloc0/gralloc0.cc
cros_gralloc/gralloc3/CrosGralloc3Utils.cc
cros_gralloc/gralloc4/CrosGralloc4Utils.cc
drv_priv.h
i915.c
mediatek.c
msm.c
rockchip.c