minigbm: gralloc0: Allow lock_ycbcr for HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED

We can use lock_ycbcr as a way to partially work around the format resolve
problem - with the assumption that if lock_ycbcr succeeds, the
android_ycbcr struct returned describes a YCbCr 4:2:0 image, we can
query gralloc for the format instead of hardcoding one statically.

BUG=b:32077885
TEST=Camera preview renders correctly on Poppy.

Change-Id: Ic20f5aa89809bf89941f3b4851c0d28965da54ac
Reviewed-on: https://chromium-review.googlesource.com/544487
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
diff --git a/cros_gralloc/gralloc0/gralloc0.cc b/cros_gralloc/gralloc0/gralloc0.cc
index 1ef9265..abefa89 100644
--- a/cros_gralloc/gralloc0/gralloc0.cc
+++ b/cros_gralloc/gralloc0/gralloc0.cc
@@ -288,7 +288,8 @@
 	}
 
 	if ((hnd->droid_format != HAL_PIXEL_FORMAT_YCbCr_420_888) &&
-	    (hnd->droid_format != HAL_PIXEL_FORMAT_YV12)) {
+	    (hnd->droid_format != HAL_PIXEL_FORMAT_YV12) &&
+	    (hnd->droid_format != HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED)) {
 		cros_gralloc_error("Non-YUV format not compatible.");
 		return CROS_GRALLOC_ERROR_BAD_HANDLE;
 	}