summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Wei Huang <cwhuang@linux.org.tw>2015-11-14 00:22:00 +0800
committerChih-Wei Huang <cwhuang@linux.org.tw>2015-11-14 00:22:00 +0800
commit02584dae2127e368b97c5bc39e27810ac1644518 (patch)
treeadb8f4aa11d37aa5d7f0385c3016d50c849a70e9
parente36151141de88c490f2b54bbed763602077e1ae7 (diff)
parent9b65142921951368fa53e48508b388cadeb55854 (diff)
downloadexternal_drm_gralloc-02584dae2127e368b97c5bc39e27810ac1644518.zip
external_drm_gralloc-02584dae2127e368b97c5bc39e27810ac1644518.tar.gz
external_drm_gralloc-02584dae2127e368b97c5bc39e27810ac1644518.tar.bz2
Merge remote-tracking branch 'x86/lollipop-x86' into marshmallow-x86
-rw-r--r--gralloc_drm_handle.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/gralloc_drm_handle.h b/gralloc_drm_handle.h
index 968f11e..f9cc626 100644
--- a/gralloc_drm_handle.h
+++ b/gralloc_drm_handle.h
@@ -36,9 +36,6 @@ struct gralloc_drm_bo_t;
struct gralloc_drm_handle_t {
native_handle_t base;
-#define GRALLOC_DRM_HANDLE_MAGIC 0x12345678
-#define GRALLOC_DRM_HANDLE_NUM_INTS 10
-#define GRALLOC_DRM_HANDLE_NUM_FDS 0
int magic;
int width;
@@ -55,6 +52,12 @@ struct gralloc_drm_handle_t {
struct gralloc_drm_bo_t *data; /* pointer to struct gralloc_drm_bo_t */
};
+#define GRALLOC_DRM_HANDLE_MAGIC 0x12345678
+#define GRALLOC_DRM_HANDLE_NUM_FDS 0
+#define GRALLOC_DRM_HANDLE_NUM_INTS ( \
+ ((sizeof(struct gralloc_drm_handle_t) - sizeof(native_handle_t))/sizeof(int)) \
+ - GRALLOC_DRM_HANDLE_NUM_FDS)
+
static inline struct gralloc_drm_handle_t *gralloc_drm_handle(buffer_handle_t _handle)
{
struct gralloc_drm_handle_t *handle =