OSDN Git Service

add GBM_BO_USE_LINEAR flag for bo creation
authorZach Reizner <zachr@google.com>
Thu, 25 Feb 2016 18:45:44 +0000 (10:45 -0800)
committerchrome-bot <chrome-bot@chromium.org>
Sat, 27 Feb 2016 11:25:52 +0000 (03:25 -0800)
commit1e229399228ac107e8ae0f73a466e3ea17fe5839
treecbb39274cb298f943e2a7434ad66edf48d7186b1
parent4fcc3c7d2275e8e90f44f6d87ebb3f858d6d4527
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>
cirrus.c
evdi.c
exynos.c
gbm.h
gbm_priv.h
i915.c
marvell.c
mediatek.c
rockchip.c
tegra.c
udl.c