add GBM_BO_USE_LINEAR flag for bo creation

Some drivers will enable tiling with the other GBM_BO_USE_* flags as an
optimization, but this interferes with reading/writing to mmapped
buffers and other devices that might expect linear buffers.

This CL adds an explicit request to minigbm to only allocate linear
buffer objects. This request is only honored for buffers that meet all
the following requirements:
 - YUV formats or ARGB/XRGB 32-bit formats.
 - Not combined with GBM_BO_USE_RENDERING
A backend might still reject an allocation even if it meets those
requirements.

This CL also raises the limit on the number of driver formats to 16.

TEST=on samus, run vgem_fb_test with GBM_BO_USE_LINEAR flag in
     gbm_bo_create
BUG=None

Change-Id: I8ca31c4c1753af816b13bd75e4feb5b76d153e2a
Reviewed-on: https://chromium-review.googlesource.com/329248
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 files changed