summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Mahaveer <vishalm@ti.com>2016-06-22 14:42:11 -0500
committerVishal Mahaveer <vishalm@ti.com>2016-06-22 14:42:11 -0500
commit10b6fc4783206c6d85cdc37e75f4e1727c23f182 (patch)
treebfd9c420a974b51d66b2ea8c5ff551682434a25c
parent059c0596e1221fd37b6b13de97f0bc45ebb7663e (diff)
downloaddra7xx-d-marshmallow-mr1-release.tar.gz
Revert "hwc: update hal_public.h to ddk1.14"d-marshmallow-mr1-release
This reverts commit 059c0596e1221fd37b6b13de97f0bc45ebb7663e. Change-Id: Ia9beb2af5eedf300a943afe946dc8333c35bc20b
-rw-r--r--hwcomposer/display.c2
-rw-r--r--hwcomposer/hal_public.h66
2 files changed, 56 insertions, 12 deletions
diff --git a/hwcomposer/display.c b/hwcomposer/display.c
index c4bd7e2..0ed70d6 100644
--- a/hwcomposer/display.c
+++ b/hwcomposer/display.c
@@ -660,7 +660,7 @@ int init_primary_display(omap_hwc_device_t *hwc_dev)
hw_get_module(GRALLOC_HARDWARE_MODULE_ID, (const hw_module_t **)&pmodule);
m = (IMG_gralloc_module_public_t *)(pmodule);
ALOGI("Set drm fd (%d) to gralloc", drm_fd);
- //m->drm_fd = drm_fd;
+ m->drm_fd = drm_fd;
}
diff --git a/hwcomposer/hal_public.h b/hwcomposer/hal_public.h
index eabf911..c39ee05 100644
--- a/hwcomposer/hal_public.h
+++ b/hwcomposer/hal_public.h
@@ -29,7 +29,7 @@
*/
#include <hardware/gralloc.h>
-#include <hardware/memtrack.h>
+#include <hardware/hwcomposer_defs.h>
#define ALIGN(x,a) (((x) + (a) - 1L) & ~((a) - 1L))
#define HW_ALIGN 32
@@ -42,12 +42,16 @@
*/
#define MAX_SUB_ALLOCS 3
-/* Format is not YCbCr (e.g. a RGB format) - bIsYUVFormat should be false */
-#define YUV_CHROMA_ORDER_NONE 0
-/* Cb follows Y */
-#define YUV_CHROMA_ORDER_CBCR_UV 1
-/* Cr follows Y */
-#define YUV_CHROMA_ORDER_CRCB_VU 2
+/* JB MR1 enables dual display support in Android framework. We continue to
+ * use the FB HAL architecture to enable such a support, and for this we need
+ * FB1 usage identifier in gralloc.
+ */
+#ifndef GRALLOC_HARDWARE_FB1
+#define GRALLOC_HARDWARE_FB1 "fb1"
+#endif
+
+/* Number of displays identifier from hwcomposer defs */
+#define NUM_FB_DEVICES HWC_NUM_DISPLAY_TYPES
typedef struct
{
@@ -111,6 +115,23 @@ typedef struct
}
__attribute__((aligned(sizeof(int)),packed)) IMG_native_handle_t;
+#if 0//defined(SUPPORT_ANDROID_FRAMEBUFFER_HAL)
+
+typedef struct
+{
+ framebuffer_device_t base;
+
+ /* The HWC was loaded. post() is no longer responsible for presents */
+ int bBypassPost;
+
+ /* HWC path for present posts */
+ int (*Post2)(framebuffer_device_t *fb, buffer_handle_t *buffers,
+ int num_buffers, void *data, int data_length);
+}
+IMG_framebuffer_device_public_t;
+
+#endif /* defined(SUPPORT_ANDROID_FRAMEBUFFER_HAL) */
+
typedef struct
{
int l, t, w, h;
@@ -146,14 +167,18 @@ typedef struct IMG_buffer_format_public_t
/* YUV output format */
int bIsYUVFormat;
- /* YCBCR_ORDERING_* defined the order of the Cb/Cr values */
- int eYUVChromaOrder;
+ /* TRUE if U/Cb follows Y, FALSE if V/Cr follows Y */
+ int bUVCbCrOrdering;
/* Utility function for adjusting YUV per-plane parameters */
IMG_buffer_format_compute_params_pfn pfnComputeParams;
}
IMG_buffer_format_public_t;
+#if 1//defined(SUPPORT_ANDROID_MEMTRACK_HAL)
+
+#include <hardware/memtrack.h>
+
typedef struct
{
/* Base memtrack record, copied to caller */
@@ -167,10 +192,20 @@ typedef struct
}
IMG_memtrack_record_public_t;
+#endif /* defined(SUPPORT_ANDROID_MEMTRACK_HAL) */
+
typedef struct IMG_gralloc_module_public_t
{
gralloc_module_t base;
+#if 0//defined(SUPPORT_ANDROID_FRAMEBUFFER_HAL)
+ /* If the framebuffer has been opened, this will point to the
+ * framebuffer device data required by the allocator, WSEGL
+ * modules and composerhal.
+ */
+ IMG_framebuffer_device_public_t *psFrameBufferDevice[NUM_FB_DEVICES];
+#endif /* defined(SUPPORT_ANDROID_FRAMEBUFFER_HAL) */
+
/* This function is deprecated and might be NULL. Do not use it. */
int (*GetPhyAddrs)(gralloc_module_t const* module,
buffer_handle_t handle, void **ppvPhyAddr);
@@ -178,9 +213,11 @@ typedef struct IMG_gralloc_module_public_t
/* Obtain HAL's registered format list */
const IMG_buffer_format_public_t *(*GetBufferFormats)(void);
+#if 1//defined(SUPPORT_ANDROID_MEMTRACK_HAL)
int (*GetMemTrackRecords)(struct IMG_gralloc_module_public_t const *module,
IMG_memtrack_record_public_t **ppsRecords,
size_t *puNumRecords);
+#endif /* defined(SUPPORT_ANDROID_MEMTRACK_HAL) */
/* Custom-blit components in lieu of overlay hardware */
int (*Blit)(struct IMG_gralloc_module_public_t const *module,
@@ -195,6 +232,8 @@ typedef struct IMG_gralloc_module_public_t
unsigned long long ui64SrcStamp, int iSrcWidth,
int iSrcHeight, int iSrcFormat, int eSrcRotation,
buffer_handle_t dest, int eDestRotation);
+
+ int drm_fd;
}
IMG_gralloc_module_public_t;
@@ -228,8 +267,13 @@ enum {
/* generic format missing from Android list, not specific to vendor implementation */
HAL_PIXEL_FORMAT_NV12 = 0x3231564E, // FourCC for NV12
-
-
};
+/* we use private_3 gralloc usage flag for identifying FB1 swapchain */
+#ifndef GRALLOC_USAGE_HW_FB1
+#define GRALLOC_USAGE_HW_FB1 GRALLOC_USAGE_PRIVATE_3
+#else
+#error GRALLOC_USAGE_HW_FB1 should only be defined by hal_public.h
+#endif
+
#endif /* HAL_PUBLIC_H */