hikey: gralloc: Add union alias and additional fields to improve interop w/ hikey960 gralloc
Since we use the gralloc_priv.h for hikey960 and hikey, try to
align the variable names a bit using a union. This allows
drm_hwcomposer importer to need less conditionally built code.
Also add logic to provide a byte_stride value, which the
hikey960 gralloc and drm_hwcomposer uses.
Change-Id: I9a26cd244b1790afbf74138504bb0eedd44d94d4
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/gralloc/gralloc_priv.h b/gralloc/gralloc_priv.h
index 40ca94f..a5f8c8b 100644
--- a/gralloc/gralloc_priv.h
+++ b/gralloc/gralloc_priv.h
@@ -166,7 +166,10 @@
int size;
int width;
int height;
- int format;
+ union {
+ int format;
+ int req_format; /* same name as gralloc960 */
+ };
int stride;
union
{
@@ -193,10 +196,10 @@
void *fb_paddr;
uint64_t fb_paddr_padding;
};
+ int byte_stride;
#if GRALLOC_ARM_DMA_BUF_MODULE
ion_user_handle_t ion_hnd;
#endif
-
#if GRALLOC_ARM_DMA_BUF_MODULE
#define GRALLOC_ARM_NUM_FDS 1
#else