OSDN Git Service

minigbm: cros_gralloc: don't fail BO_USE_SW_*_OFTEN | BO_USE_RENDERING allocation
authorGurchetan Singh <gurchetansingh@chromium.org>
Tue, 27 Dec 2016 18:25:18 +0000 (10:25 -0800)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 29 Dec 2016 08:58:17 +0000 (00:58 -0800)
commit682d73bd00595a493bd446c5274bef08bd17c096
treed436ffef849af719835b5285979d27019fb66e3b
parentb1efbd8d169f6d72f69a0f381db9f6dc80e372bf
minigbm: cros_gralloc: don't fail BO_USE_SW_*_OFTEN | BO_USE_RENDERING allocation

Some camera CTS tests pass down the following usage:

GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_SW_WRITE_OFTEN,

which we convert. Since we generally want to create a tiled buffer when
GRALLOC_USAGE_HW_TEXTURE is specified and tiled buffers are inefficient for
frequent software access, many drivers don't support this combination.

When this occurs, let's drop the BO_USE_RENDERING flag and try the allocation again
with different flags.

BUG=chromium:616275
TEST=run cts --disable-reboot --class android.hardware.camera2.cts.MultiViewTest
passes on kevin

Change-Id: Id3364edb849fe92d4710c765ed664e8aa4a4738d
Reviewed-on: https://chromium-review.googlesource.com/424318
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
cros_gralloc/cros_alloc_device.cc