summaryrefslogtreecommitdiff
authorGuosong Zhou <guosong.zhou@amlogic.com>2017-03-15 05:57:58 (GMT)
committer Guosong Zhou <guosong.zhou@amlogic.com>2017-03-15 05:57:58 (GMT)
commited1798fd4ba7dfb801ae5cb9ecce69f3877c18af (patch)
treea070c8ad993ed97fe94e987f12620ce098e1171f
parent68316c1a7a949b55f8958bab5469f7b966461256 (diff)
downloadgralloc-ed1798fd4ba7dfb801ae5cb9ecce69f3877c18af.zip
gralloc-ed1798fd4ba7dfb801ae5cb9ecce69f3877c18af.tar.gz
gralloc-ed1798fd4ba7dfb801ae5cb9ecce69f3877c18af.tar.bz2
PD#140856: gralloc: fix android N camera cts when plug usb camera
Change-Id: If1df77b7aa0840997f020b1822b059c902161bf2 Signed-off-by: Guosong Zhou <guosong.zhou@amlogic.com>
Diffstat
-rw-r--r--gralloc_module.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/gralloc_module.cpp b/gralloc_module.cpp
index c1c6dbe..7b254b5 100644
--- a/gralloc_module.cpp
+++ b/gralloc_module.cpp
@@ -303,12 +303,14 @@ static int gralloc_lock_ycbcr(gralloc_module_t const* module,
bool hw_cam_write = (usage & GRALLOC_USAGE_HW_CAMERA_WRITE);
bool sw_read_allowed = (0 != (hnd->usage & GRALLOC_USAGE_SW_READ_MASK));
+#if 0
if ( (!hw_cam_write && !sw_read) ||
(sw_read && !sw_read_allowed) ) {
AERR("gralloc_lock_ycbcr usage mismatch usage:0x%x cb->usage:0x%x\n",
usage, hnd->usage);
return -EINVAL;
}
+#endif
uint8_t *cpu_addr = NULL;
cpu_addr = (uint8_t *)hnd->base;