display: Clean up gralloc
* Remove pmem and ashmem implementations
* Remove usage of RefBase
* Reduce log verbosity
Change-Id: If8ef543d236e5305bd5430f4f9c62c51b3a13787
diff --git a/libgralloc/gralloc_priv.h b/libgralloc/gralloc_priv.h
index c38ed79..52f7ca8 100644
--- a/libgralloc/gralloc_priv.h
+++ b/libgralloc/gralloc_priv.h
@@ -34,33 +34,22 @@
/* gralloc usage bits indicating the type
* of allocation that should be used */
- /* ADSP heap is deprecated, use only if using pmem */
- GRALLOC_USAGE_PRIVATE_ADSP_HEAP = GRALLOC_USAGE_PRIVATE_0,
- /* SF heap is used for application buffers, is not secured */
- GRALLOC_USAGE_PRIVATE_UI_CONTIG_HEAP = GRALLOC_USAGE_PRIVATE_1,
- /* SMI heap is deprecated, use only if using pmem */
- GRALLOC_USAGE_PRIVATE_SMI_HEAP = GRALLOC_USAGE_PRIVATE_2,
/* SYSTEM heap comes from kernel vmalloc,
* can never be uncached, is not secured*/
- GRALLOC_USAGE_PRIVATE_SYSTEM_HEAP = GRALLOC_USAGE_PRIVATE_3,
+ GRALLOC_USAGE_PRIVATE_SYSTEM_HEAP = GRALLOC_USAGE_PRIVATE_0,
+ /* SF heap is used for application buffers, is not secured */
+ GRALLOC_USAGE_PRIVATE_UI_CONTIG_HEAP = GRALLOC_USAGE_PRIVATE_1,
/* IOMMU heap comes from manually allocated pages,
* can be cached/uncached, is not secured */
- GRALLOC_USAGE_PRIVATE_IOMMU_HEAP = 0x01000000,
+ GRALLOC_USAGE_PRIVATE_IOMMU_HEAP = GRALLOC_USAGE_PRIVATE_2,
/* MM heap is a carveout heap for video, can be secured*/
- GRALLOC_USAGE_PRIVATE_MM_HEAP = 0x02000000,
- /* WRITEBACK heap is a carveout heap for writeback, can be secured*/
- GRALLOC_USAGE_PRIVATE_WRITEBACK_HEAP = 0x04000000,
+ GRALLOC_USAGE_PRIVATE_MM_HEAP = GRALLOC_USAGE_PRIVATE_3,
/* CAMERA heap is a carveout heap for camera, is not secured*/
- GRALLOC_USAGE_PRIVATE_CAMERA_HEAP = 0x08000000,
+ GRALLOC_USAGE_PRIVATE_CAMERA_HEAP = 0x01000000,
/* Set this for allocating uncached memory (using O_DSYNC)
* cannot be used with noncontiguous heaps */
- GRALLOC_USAGE_PRIVATE_UNCACHED = 0x00100000,
-
- /* This flag needs to be set when using a non-contiguous heap from ION.
- * If not set, the system heap is assumed to be coming from ashmem
- */
- GRALLOC_USAGE_PRIVATE_ION = 0x00200000,
+ GRALLOC_USAGE_PRIVATE_UNCACHED = 0x02000000,
/* This flag can be set to disable genlock synchronization
* for the gralloc buffer. If this flag is set the caller
@@ -68,18 +57,15 @@
* WARNING - flag is outside the standard PRIVATE region
* and may need to be moved if the gralloc API changes
*/
- GRALLOC_USAGE_PRIVATE_UNSYNCHRONIZED = 0X00400000,
-
- /* Set this flag when you need to avoid mapping the memory in userspace */
- GRALLOC_USAGE_PRIVATE_DO_NOT_MAP = 0X00800000,
+ GRALLOC_USAGE_PRIVATE_UNSYNCHRONIZED = 0X04000000,
/* Buffer content should be displayed on an external display only */
- GRALLOC_USAGE_EXTERNAL_ONLY = 0x00010000,
+ GRALLOC_USAGE_EXTERNAL_ONLY = 0x08000000,
/* Only this buffer content should be displayed on external, even if
* other EXTERNAL_ONLY buffers are available. Used during suspend.
*/
- GRALLOC_USAGE_EXTERNAL_BLOCK = 0x00020000,
+ GRALLOC_USAGE_EXTERNAL_BLOCK = 0x00100000,
/* Use this flag to request content protected buffers. Please note
* that this flag is different from the GRALLOC_USAGE_PROTECTED flag
@@ -87,7 +73,7 @@
* but still need to be protected from screen captures
* 0x00040000 is reserved and these values are subject to change.
*/
- GRALLOC_USAGE_PRIVATE_CP_BUFFER = 0x00080000,
+ GRALLOC_USAGE_PRIVATE_CP_BUFFER = 0x00200000,
};
enum {
@@ -96,12 +82,14 @@
GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER = 0x080000001,
};
+#define GRALLOC_HEAP_MASK (GRALLOC_USAGE_PRIVATE_UI_CONTIG_HEAP |\
+ GRALLOC_USAGE_PRIVATE_SYSTEM_HEAP |\
+ GRALLOC_USAGE_PRIVATE_IOMMU_HEAP |\
+ GRALLOC_USAGE_PRIVATE_MM_HEAP |\
+ GRALLOC_USAGE_PRIVATE_CAMERA_HEAP)
#define INTERLACE_MASK 0x80
#define S3D_FORMAT_MASK 0xFF000
-#define DEVICE_PMEM "/dev/pmem"
-#define DEVICE_PMEM_ADSP "/dev/pmem_adsp"
-#define DEVICE_PMEM_SMIPOOL "/dev/pmem_smipool"
/*****************************************************************************/
enum {
/* OEM specific HAL formats */