diff options
author | Heng-Ruey Hsu <henryhsu@chromium.org> | 2017-04-27 11:33:35 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-02 22:50:31 -0700 |
commit | f4b7b8da0da92291007d5b14097992f23420b98d (patch) | |
tree | 42541eb0d9adb55c0c443993e1fbba70d7ff1df6 /rockchip.c | |
parent | 68af9c2b9ed1addebca93506d6a5b7f5a5eef7f7 (diff) |
Add HAL_PIXEL_FORMAT_BLOB format in cros gralloc
We convert HAL_PIXEL_FORMAT_BLOB to DRM_FORMAT_R8 for camera picture
taking. Choose DRM_FORMAT_R8 because <system/graphics.h> requires the
buffers with a format HAL_PIXEL_FORMAT_BLOB have a height of 1, and
width equal to their size in bytes.
BUG=b:37692495
TEST=open camera app and take a picture.
Change-Id: I11a82b057b7c1174dd946e0b7d3cbde9c1d630d9
Reviewed-on: https://chromium-review.googlesource.com/487552
Commit-Ready: Heng-ruey Hsu <henryhsu@google.com>
Tested-by: Heng-ruey Hsu <henryhsu@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Diffstat (limited to 'rockchip.c')
-rw-r--r-- | rockchip.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -18,10 +18,11 @@ #include "helpers.h" #include "util.h" -static const uint32_t supported_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888, - DRM_FORMAT_NV12, DRM_FORMAT_RGB565, - DRM_FORMAT_XBGR8888, DRM_FORMAT_XRGB8888, - DRM_FORMAT_YVU420, DRM_FORMAT_YVU420_ANDROID }; +static const uint32_t supported_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888, + DRM_FORMAT_NV12, DRM_FORMAT_R8, + DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888, + DRM_FORMAT_XRGB8888, DRM_FORMAT_YVU420, + DRM_FORMAT_YVU420_ANDROID }; static int afbc_bo_from_format(struct bo *bo, uint32_t width, uint32_t height, uint32_t format) { |