Add mapped_access_perf_test.c

This CL adds a first version of a microbenchmark that investigates
the performance of a mmap()ed BO created with different USE flags,
by mmap()ing a few of them and using them as src/dst of a pixel
manipulation operation somewhat akin to Chrome's (a rotation).

Some results on zork reflect indeed differences [1], e.g. for read
operations GBM_BO_USE_SW_READ_OFTEN makes it ~2 orders of magnitude
faster (!!). But for write operations, having such USE flag is
detrimental.

[1] https://pastebin.com/raw/kN6VvHpQ

BUG=b:179738634
TEST=emerge & cros deploy & run on zork, trogdor.

Change-Id: I0231cec67718ed8c89de2ec322f150fe3ea55d58
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/drm-tests/+/2709568
Reviewed-by: Andres Calderon Jaramillo <andrescj@google.com>
Tested-by: Miguel Casas <mcasas@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
2 files changed