diff options
Diffstat (limited to 'include/hardware/gralloc.h')
-rw-r--r-- | include/hardware/gralloc.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/hardware/gralloc.h b/include/hardware/gralloc.h index 7c819f0..b758b57 100644 --- a/include/hardware/gralloc.h +++ b/include/hardware/gralloc.h @@ -106,8 +106,26 @@ enum { GRALLOC_USAGE_PRIVATE_2 = 0x40000000, GRALLOC_USAGE_PRIVATE_3 = 0x80000000, GRALLOC_USAGE_PRIVATE_MASK = 0xF0000000, + +#ifdef EXYNOS4_ENHANCEMENTS + /* SAMSUNG */ + GRALLOC_USAGE_PRIVATE_NONECACHE = 0x00800000, + + GRALLOC_USAGE_HW_FIMC1 = 0x01000000, + GRALLOC_USAGE_HW_ION = 0x02000000, + GRALLOC_USAGE_YUV_ADDR = 0x04000000, + GRALLOC_USAGE_CAMERA = 0x08000000, + + /* SEC Private usage , for Overlay path at HWC */ + GRALLOC_USAGE_HWC_HWOVERLAY = 0x20000000, +#endif }; +enum { + /* Gralloc perform enums */ + GRALLOC_MODULE_PERFORM_UPDATE_BUFFER_GEOMETRY = 0, + GRALLOC_MODULE_PERFORM_PRIVATE_START +}; /*****************************************************************************/ /** @@ -196,6 +214,10 @@ typedef struct gralloc_module_t { int (*unlock)(struct gralloc_module_t const* module, buffer_handle_t handle); +#ifdef EXYNOS4_ENHANCEMENTS + int (*getphys) (struct gralloc_module_t const* module, + buffer_handle_t handle, void** paddr); +#endif /* reserved for future use */ int (*perform)(struct gralloc_module_t const* module, @@ -215,6 +237,21 @@ typedef struct gralloc_module_t { typedef struct alloc_device_t { struct hw_device_t common; +#ifdef QCOM_HARDWARE + /* + * (*allocSize)() Allocates a buffer in graphic memory with the requested + * bufferSize parameter and returns a buffer_handle_t and the stride in + * pixels to allow the implementation to satisfy hardware constraints on + * the width of a pixmap (eg: it may have to be multiple of 8 pixels). + * The CALLER TAKES OWNERSHIP of the buffer_handle_t. + * + * Returns 0 on success or -errno on error. + */ + int (*allocSize)(struct alloc_device_t* dev, + int w, int h, int format, int usage, + buffer_handle_t* handle, int* stride, int bufferSize); +#endif + /* * (*alloc)() Allocates a buffer in graphic memory with the requested * parameters and returns a buffer_handle_t and the stride in pixels to |