diff options
author | Tomasz Figa <tfiga@chromium.org> | 2017-07-05 18:15:06 +0900 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-07-10 11:22:36 -0700 |
commit | ce1ae023e9d389eda397b5a4f463be442fd859e7 (patch) | |
tree | 4c6f367bb1904fa3fe564593e2553b769e11cbc1 /vgem.c | |
parent | 9e5d12a9d5133cd1709af821680fe6161b7593ba (diff) |
minigbm: Resolve format based on BO usage flags
On certain platforms, depending on buffer usage, the preference for
implementation defined or flexible YUV formats might be different.
For example, the camera subsystem on Poppy (i915) requires NV12 for
HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, but it can't be used in place
of RGBX as a render target.
Allow this by extending the .resolve_format driver callback to take BO
flags as argument and let the driver include this in the format
selection logic.
BUG=b:37615277
TEST=compile
Change-Id: Ieb44c294584ab25f106a92f406353212989d0724
Reviewed-on: https://chromium-review.googlesource.com/487553
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Diffstat (limited to 'vgem.c')
-rw-r--r-- | vgem.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -47,7 +47,7 @@ static int vgem_bo_create(struct bo *bo, uint32_t width, uint32_t height, uint32 return drv_dumb_bo_create(bo, width, height, format, flags); } -static uint32_t vgem_resolve_format(uint32_t format) +static uint32_t vgem_resolve_format(uint32_t format, uint64_t usage) { switch (format) { case DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED: |