Add a new GBM usage flag for buffers used a output for camera subsystem.
It corresponds to Android GRALLOC_USAGE_HW_CAMERA_{READ,WRITE} flags and
translates to the same BO_USE_HW_CAMERA_{READ,WRITE} flags of drv.
BUG=b:
62358788
TEST=compile
Change-Id: Ib7063437e39d1e08f643763c6ce383ce8657f5ce
Reviewed-on: https://chromium-review.googlesource.com/560935
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
* The buffer will be used as a texture that will be sampled from.
*/
GBM_BO_USE_TEXTURING = (1 << 5),
+ /**
+ * The buffer will be written to by a camera subsystem.
+ */
+ GBM_BO_USE_CAMERA_WRITE = (1 << 6),
+ /**
+ * The buffer will be read from by a camera subsystem.
+ */
+ GBM_BO_USE_CAMERA_READ = (1 << 7),
};
int
usage |= BO_USE_TEXTURE;
if (flags & GBM_BO_USE_LINEAR)
usage |= BO_USE_LINEAR;
+ if (flags & GBM_BO_USE_CAMERA_WRITE)
+ usage |= BO_USE_CAMERA_WRITE;
+ if (flags & GBM_BO_USE_CAMERA_READ)
+ usage |= BO_USE_CAMERA_READ;
return usage;
}