summaryrefslogtreecommitdiff
path: root/gralloc_gbm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gralloc_gbm.cpp')
-rw-r--r--gralloc_gbm.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gralloc_gbm.cpp b/gralloc_gbm.cpp
index f7e5750..299213b 100644
--- a/gralloc_gbm.cpp
+++ b/gralloc_gbm.cpp
@@ -37,6 +37,8 @@
#include <hardware/gralloc.h>
#include <system/graphics.h>
+#include <drm/drm_fourcc.h>
+
#include <gbm.h>
#include "gralloc_gbm_priv.h"
@@ -169,6 +171,9 @@ static struct gralloc_gbm_bo_t *gbm_alloc(struct gbm_device *gbm,
ALOGV("create BO, size=%dx%d, fmt=%d, usage=%x",
handle->width, handle->height, handle->format, usage);
buf->bo = gbm_bo_create(gbm, width, height, format, usage);
+ const uint64_t modifiers[] = { DRM_FORMAT_MOD_VIVANTE_SUPER_TILED };
+ buf->bo = gbm_bo_create_with_modifiers(gbm, width, height, format, (uint64_t *) &modifiers, 1);
+ //buf->bo = gbm_bo_create(gbm, width, height, format, usage);
if (!buf->bo) {
ALOGE("failed to create BO, size=%dx%d, fmt=%d, usage=%x",
handle->width, handle->height, handle->format, usage);
@@ -291,7 +296,8 @@ static struct gralloc_gbm_bo_t *validate_handle(buffer_handle_t _handle,
if (!gbm)
return NULL;
- ALOGV("handle: pfd=%d\n", handle->prime_fd);
+ ALOGE("%s handle->prime_fd=%llu\n", __func__, handle->prime_fd);
+ ALOGE("%s handle->modifier=%llu\n", __func__, handle->modifier);
bo = gbm_import(gbm, handle);
if (bo) {