summaryrefslogtreecommitdiff
path: root/drv_priv.h
diff options
context:
space:
mode:
authorTomasz Figa <tfiga@chromium.org>2017-07-05 18:15:06 +0900
committerchrome-bot <chrome-bot@chromium.org>2017-07-10 11:22:36 -0700
commitce1ae023e9d389eda397b5a4f463be442fd859e7 (patch)
tree4c6f367bb1904fa3fe564593e2553b769e11cbc1 /drv_priv.h
parent9e5d12a9d5133cd1709af821680fe6161b7593ba (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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drv_priv.h b/drv_priv.h
index df5c8e9..06c5979 100644
--- a/drv_priv.h
+++ b/drv_priv.h
@@ -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;
};