minigbm: rockchip/mediatek: keep a local cached mapping of the buffer

All GEM mappings are write-combined by default. This leads to
performance issues with renderscript CTS tests on ARM boards.
Let's keep a local copy of the buffer in the hopes of improving
the test's performance.

BUG=b:38097499
TEST=run cts -m CtsViewTestCases -t android.view.cts.SurfaceViewSyncTests
     passes on 9776.0.0 veyron_minnie

Change-Id: I74da770f42524e66ca643adfbe9475362ee397cc
Reviewed-on: https://chromium-review.googlesource.com/601536
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
2 files changed