Gralloc: Move GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI to lower 32 bits
1) Move GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI to bit 30. Custom formats
like HAL_PIXEL_FORMAT_YCbCr_420_P010_VENUS and
HAL_PIXEL_FORMAT_YCbCr_420_TP10_UBWC can now be used directly without
needing gralloc flags to be set therby freeing bit 27 and bit 30.
2) Add PRIV_FLAGS_SECURE_BUFFER and PRIV_FLAGS_USES_ION to
GetCustomFormatFlags API.
Change-Id: Iee14af2f1a3774ef9922aa380c204ca5ebf60147
CRs-Fixed: 2255171
diff --git a/gralloc/gralloc_priv.h b/gralloc/gralloc_priv.h
index 8f8c0c4..c1af858 100644
--- a/gralloc/gralloc_priv.h
+++ b/gralloc/gralloc_priv.h
@@ -49,7 +49,10 @@
#define GRALLOC_USAGE_PRIVATE_UNCACHED (UINT32_C(1) << 29)
/* This flag is used to indicate P010 format */
-#define GRALLOC_USAGE_PRIVATE_10BIT (UINT32_C(1) << 30)
+#define GRALLOC_USAGE_PRIVATE_10BIT 0
+
+/* This flag indicates PI format is being used */
+#define GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI (UINT32_C(1) << 30)
/* This flag is used for SECURE display usecase */
#define GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY (UINT32_C(1) << 31)
@@ -67,10 +70,8 @@
#define GRALLOC_USAGE_PRIVATE_WFD (UINT32_C(1) << 21)
/* This flag is used to indicate 10-bit tight pack format (e.g. TP10) */
-#define GRALLOC_USAGE_PRIVATE_10BIT_TP (UINT32_C(1) << 27)
+#define GRALLOC_USAGE_PRIVATE_10BIT_TP 0
-/* This flag indicates PI format is being used */
-#define GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI 1ULL << 49
/* Legacy gralloc1 definitions */
/* Some clients may still be using the old flags */
#define GRALLOC1_PRODUCER_USAGE_PRIVATE_ADSP_HEAP GRALLOC_USAGE_PRIVATE_ADSP_HEAP