summaryrefslogtreecommitdiff
path: root/drv.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.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.h')
-rw-r--r--drv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drv.h b/drv.h
index f478a66..d96b30d 100644
--- a/drv.h
+++ b/drv.h
@@ -132,7 +132,7 @@ uint32_t drv_bo_get_format(struct bo *bo);
uint32_t drv_bo_get_stride_in_pixels(struct bo *bo);
-uint32_t drv_resolve_format(struct driver *drv, uint32_t format);
+uint32_t drv_resolve_format(struct driver *drv, uint32_t format, uint64_t usage);
size_t drv_num_planes_from_format(uint32_t format);