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 /drv_priv.h | |
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 'drv_priv.h')
-rw-r--r-- | drv_priv.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -75,7 +75,7 @@ struct backend { int (*bo_import)(struct bo *bo, struct drv_import_fd_data *data); void *(*bo_map)(struct bo *bo, struct map_info *data, size_t plane); int (*bo_unmap)(struct bo *bo, struct map_info *data); - uint32_t (*resolve_format)(uint32_t format); + uint32_t (*resolve_format)(uint32_t format, uint64_t usage); struct combinations combos; }; |