amdgpu: Do not support mapping tiled buffers on android

Some CTS tests allocate buffers with
AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE or
AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT along with
AHARDWAREBUFFER_USAGE_CPU_READ_RARELY, which is not a common usage in
the real world.

On AMD platforms, this results in a tiled buffer being allocated which
ends up having a different stride when mapped for read, and the
different stride does not get propagated to the caller through the
gralloc API. This results in CTS test failures when checking buffer
contents.

Removing support for READ_RARELY and WRITE_RARELY usage for tiled buffers
in Android works around this by ensuring that any buffers that need to be
mapped for read/write are linear buffers.

BUG=b:190028349
TEST=CtsNativeHardwareTestCases passes on grunt and zork

Change-Id: I9d595ea980b352610b2379330935505d92e8a555
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2952004
Tested-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Drew Davenport <ddavenport@chromium.org>
1 file changed