summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGowtham Tammana <g-tammana@ti.com>2018-03-28 14:22:42 -0500
committerGowtham Tammana <g-tammana@ti.com>2018-03-28 15:07:20 -0500
commitbcc594ab4b69924d604d5e52cc8e0adaf72cb49c (patch)
tree280a2c804dc6e5bee70a4f09eae6becbfd4dd4fe
parent55aa3487cc20496257aaf791b492c1161f42e20c (diff)
downloaddra7xx-bcc594ab4b69924d604d5e52cc8e0adaf72cb49c.tar.gz
hwc: hal_public.h: Update to newer gralloc
gralloc implementation was updated to newer 1.17 version. This change updates the public header associated with it. Change-Id: I91ee339119c1e16236842108204b15a3a72e7cc9 Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
-rw-r--r--hwcomposer/hal_public.h64
1 files changed, 37 insertions, 27 deletions
diff --git a/hwcomposer/hal_public.h b/hwcomposer/hal_public.h
index 09365a7..5ca9bd2 100644
--- a/hwcomposer/hal_public.h
+++ b/hwcomposer/hal_public.h
@@ -79,7 +79,7 @@ typedef struct
int fd[MAX_SUB_ALLOCS];
#define IMG_NATIVE_HANDLE_NUMINTS \
- ((sizeof(unsigned long long) / sizeof(int)) + 5 + MAX_SUB_ALLOCS + 1)
+ ((sizeof(unsigned long long) / sizeof(int)) + 5 + MAX_SUB_ALLOCS + 1 + MAX_SUB_ALLOCS + MAX_SUB_ALLOCS)
/* A KERNEL unique identifier for any exported kernel meminfo. Each
* exported kernel meminfo will have a unique stamp, but note that in
* userspace, several meminfos across multiple processes could have
@@ -108,6 +108,12 @@ typedef struct
*/
unsigned int uiAllocSize[MAX_SUB_ALLOCS];
unsigned int uiFlags;
+ /* For multi-planar allocations, there will be multiple hstrides */
+ int aiStride[MAX_SUB_ALLOCS];
+
+ /* For multi-planar allocations, there will be multiple vstrides */
+ int aiVStride[MAX_SUB_ALLOCS];
+
}
__attribute__((aligned(sizeof(int)),packed)) IMG_native_handle_t;
@@ -178,6 +184,8 @@ typedef struct IMG_gralloc_module_public_t
/* Obtain HAL's registered format list */
const IMG_buffer_format_public_t *(*GetBufferFormats)(void);
+ int (*GetImplementationFormat) (struct IMG_gralloc_module_public_t const *psGrallocModule, int usage);
+
int (*GetMemTrackRecords)(struct IMG_gralloc_module_public_t const *module,
IMG_memtrack_record_public_t **ppsRecords,
size_t *puNumRecords);
@@ -203,33 +211,35 @@ IMG_gralloc_module_public_t;
*/
enum {
- /*
- * 0x100 - 0x1FF
- *
- * This range is reserved for pixel formats that are specific to the HAL
- * implementation. Implementations can use any value in this range to
- * communicate video pixel formats between their HAL modules. These formats
- * must not have an alpha channel. Additionally, an EGLimage created from a
- * gralloc buffer of one of these formats must be supported for use with the
- * GL_OES_EGL_image_external OpenGL ES extension.
- */
-
- /*
- * These are vendor specific pixel formats, by (informal) convention IMGTec
- * formats start from the top of the range, TI formats start from the bottom
- */
- HAL_PIXEL_FORMAT_TI_NV12 = 0x100,
- HAL_PIXEL_FORMAT_TI_UNUSED = 0x101,
- HAL_PIXEL_FORMAT_TI_NV12_1D = 0x102,
- HAL_PIXEL_FORMAT_TI_Y8 = 0x103,
- HAL_PIXEL_FORMAT_TI_Y16 = 0x104,
- HAL_PIXEL_FORMAT_TI_UYVY = 0x105,
- HAL_PIXEL_FORMAT_BGRX_8888 = 0x1FF,
-
- /* generic format missing from Android list, not specific to vendor implementation */
- HAL_PIXEL_FORMAT_NV12 = 0x3231564E, // FourCC for NV12
-
+ /*
+ * 0x100 = 0x1FF
+ *
+ * This range is reserved for pixel formats that are specific to the HAL
+ * implementation. Implementations can use any value in this range to
+ * communicate video pixel formats between their HAL modules. These
+ * formats must not have an alpha channel. Additionally, an EGLimage
+ * created from a gralloc buffer of one of these formats must be
+ * supported for use with the GL_OES_EGL_image_external OpenGL ES
+ * extension.
+ */
+ /*
+ * These are vendor specific pixel format, by (informal) convention
+ * IMGTec formats start from the top of the range, TI formats start from
+ * the bottom
+ */
+ HAL_PIXEL_FORMAT_TI_NV12 = 0x100,
+ HAL_PIXEL_FORMAT_TI_UNUSED = 0x101,
+ HAL_PIXEL_FORMAT_TI_NV12_1D = 0x102,
+ HAL_PIXEL_FORMAT_TI_Y8 = 0x103,
+ HAL_PIXEL_FORMAT_TI_Y16 = 0x104,
+ HAL_PIXEL_FORMAT_TI_UYVY = 0x105,
+ HAL_PIXEL_FORMAT_BGRX_8888 = 0x1FF,
+
+ /* generic format missing from Android list, not specific to vendor
+ * implementation
+ */
+ HAL_PIXEL_FORMAT_NV12 = 0x3231564E, // FourCC for NV12
};
#endif /* HAL_PUBLIC_H */