summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGowtham Tammana2018-03-28 14:22:42 -0500
committerPraneeth Bajjuri2018-04-18 10:37:28 -0500
commitb696cfa0aef610956b6e45bc5047982c42140172 (patch)
tree8728c28a91ec64ea3ccc31dfd40bac81e10ec306
parent273aef50f05878b58ba58be7dac47a59a11d020d (diff)
downloadandroid-hardware-ti-dra7xx-b696cfa0aef610956b6e45bc5047982c42140172.tar.gz
android-hardware-ti-dra7xx-b696cfa0aef610956b6e45bc5047982c42140172.tar.xz
android-hardware-ti-dra7xx-b696cfa0aef610956b6e45bc5047982c42140172.zip
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
79 int fd[MAX_SUB_ALLOCS]; 79 int fd[MAX_SUB_ALLOCS];
80 80
81#define IMG_NATIVE_HANDLE_NUMINTS \ 81#define IMG_NATIVE_HANDLE_NUMINTS \
82 ((sizeof(unsigned long long) / sizeof(int)) + 5 + MAX_SUB_ALLOCS + 1) 82 ((sizeof(unsigned long long) / sizeof(int)) + 5 + MAX_SUB_ALLOCS + 1 + MAX_SUB_ALLOCS + MAX_SUB_ALLOCS)
83 /* A KERNEL unique identifier for any exported kernel meminfo. Each 83 /* A KERNEL unique identifier for any exported kernel meminfo. Each
84 * exported kernel meminfo will have a unique stamp, but note that in 84 * exported kernel meminfo will have a unique stamp, but note that in
85 * userspace, several meminfos across multiple processes could have 85 * userspace, several meminfos across multiple processes could have
@@ -108,6 +108,12 @@ typedef struct
108 */ 108 */
109 unsigned int uiAllocSize[MAX_SUB_ALLOCS]; 109 unsigned int uiAllocSize[MAX_SUB_ALLOCS];
110 unsigned int uiFlags; 110 unsigned int uiFlags;
111 /* For multi-planar allocations, there will be multiple hstrides */
112 int aiStride[MAX_SUB_ALLOCS];
113
114 /* For multi-planar allocations, there will be multiple vstrides */
115 int aiVStride[MAX_SUB_ALLOCS];
116
111} 117}
112__attribute__((aligned(sizeof(int)),packed)) IMG_native_handle_t; 118__attribute__((aligned(sizeof(int)),packed)) IMG_native_handle_t;
113 119
@@ -178,6 +184,8 @@ typedef struct IMG_gralloc_module_public_t
178 /* Obtain HAL's registered format list */ 184 /* Obtain HAL's registered format list */
179 const IMG_buffer_format_public_t *(*GetBufferFormats)(void); 185 const IMG_buffer_format_public_t *(*GetBufferFormats)(void);
180 186
187 int (*GetImplementationFormat) (struct IMG_gralloc_module_public_t const *psGrallocModule, int usage);
188
181 int (*GetMemTrackRecords)(struct IMG_gralloc_module_public_t const *module, 189 int (*GetMemTrackRecords)(struct IMG_gralloc_module_public_t const *module,
182 IMG_memtrack_record_public_t **ppsRecords, 190 IMG_memtrack_record_public_t **ppsRecords,
183 size_t *puNumRecords); 191 size_t *puNumRecords);
@@ -203,33 +211,35 @@ IMG_gralloc_module_public_t;
203 */ 211 */
204 212
205enum { 213enum {
206 /* 214 /*
207 * 0x100 - 0x1FF 215 * 0x100 = 0x1FF
208 * 216 *
209 * This range is reserved for pixel formats that are specific to the HAL 217 * This range is reserved for pixel formats that are specific to the HAL
210 * implementation. Implementations can use any value in this range to 218 * implementation. Implementations can use any value in this range to
211 * communicate video pixel formats between their HAL modules. These formats 219 * communicate video pixel formats between their HAL modules. These
212 * must not have an alpha channel. Additionally, an EGLimage created from a 220 * formats must not have an alpha channel. Additionally, an EGLimage
213 * gralloc buffer of one of these formats must be supported for use with the 221 * created from a gralloc buffer of one of these formats must be
214 * GL_OES_EGL_image_external OpenGL ES extension. 222 * supported for use with the GL_OES_EGL_image_external OpenGL ES
215 */ 223 * extension.
216 224 */
217 /*
218 * These are vendor specific pixel formats, by (informal) convention IMGTec
219 * formats start from the top of the range, TI formats start from the bottom
220 */
221 HAL_PIXEL_FORMAT_TI_NV12 = 0x100,
222 HAL_PIXEL_FORMAT_TI_UNUSED = 0x101,
223 HAL_PIXEL_FORMAT_TI_NV12_1D = 0x102,
224 HAL_PIXEL_FORMAT_TI_Y8 = 0x103,
225 HAL_PIXEL_FORMAT_TI_Y16 = 0x104,
226 HAL_PIXEL_FORMAT_TI_UYVY = 0x105,
227 HAL_PIXEL_FORMAT_BGRX_8888 = 0x1FF,
228
229 /* generic format missing from Android list, not specific to vendor implementation */
230 HAL_PIXEL_FORMAT_NV12 = 0x3231564E, // FourCC for NV12
231
232 225
226 /*
227 * These are vendor specific pixel format, by (informal) convention
228 * IMGTec formats start from the top of the range, TI formats start from
229 * the bottom
230 */
231 HAL_PIXEL_FORMAT_TI_NV12 = 0x100,
232 HAL_PIXEL_FORMAT_TI_UNUSED = 0x101,
233 HAL_PIXEL_FORMAT_TI_NV12_1D = 0x102,
234 HAL_PIXEL_FORMAT_TI_Y8 = 0x103,
235 HAL_PIXEL_FORMAT_TI_Y16 = 0x104,
236 HAL_PIXEL_FORMAT_TI_UYVY = 0x105,
237 HAL_PIXEL_FORMAT_BGRX_8888 = 0x1FF,
238
239 /* generic format missing from Android list, not specific to vendor
240 * implementation
241 */
242 HAL_PIXEL_FORMAT_NV12 = 0x3231564E, // FourCC for NV12
233}; 243};
234 244
235#endif /* HAL_PUBLIC_H */ 245#endif /* HAL_PUBLIC_H */