display: metadata fixes

* Do not log error on invalid metadata fds, such usages are
possible in some scenarios
* Correct usage of metadata API for some cases.

CRs-Fixed: 2122143
Change-Id: Id9cc7f4d27ef1890668f414d92b96cd419b6a066
diff --git a/libgralloc1/gr_utils.h b/libgralloc1/gr_utils.h
index 2a08539..4b2f136 100644
--- a/libgralloc1/gr_utils.h
+++ b/libgralloc1/gr_utils.h
@@ -71,7 +71,7 @@
                                 unsigned int *alignedw, unsigned int *alignedh);
 void GetAlignedWidthAndHeight(const BufferInfo &d, unsigned int *aligned_w,
                               unsigned int *aligned_h);
-int GetYUVPlaneInfo(const private_handle_t *hnd, struct android_ycbcr *ycbcr);
+int GetYUVPlaneInfo(const private_handle_t *hnd, struct android_ycbcr ycbcr[2]);
 int GetRgbDataAddress(private_handle_t *hnd, void **rgb_data);
 bool IsUBwcFormat(int format);
 bool IsUBwcSupported(int format);
@@ -84,7 +84,7 @@
 void GetYuvUbwcSPPlaneInfo(uint64_t base, uint32_t width, uint32_t height, int color_format,
                            struct android_ycbcr *ycbcr);
 void GetYuvUbwcInterlacedSPPlaneInfo(uint64_t base, uint32_t width, uint32_t height,
-                                     int color_format, struct android_ycbcr *ycbcr);
+                                     int color_format, struct android_ycbcr ycbcr[2]);
 void GetRgbUBwcBlockSize(uint32_t bpp, int *block_width, int *block_height);
 unsigned int GetRgbUBwcMetaBufferSize(int width, int height, uint32_t bpp);
 unsigned int GetUBwcSize(int width, int height, int format, unsigned int alignedw,