summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@collabora.com>2017-07-30 13:10:25 +0200
committerRobert Foss <robert.foss@collabora.com>2017-07-30 13:10:25 +0200
commitbdf1a26b3f0ae6d5f2d2c168f9d3388ce1a403cf (patch)
tree47052d7acd232c583c1d9bb6acbcc17cf99ac40a
parentdb167790a140c523531c2c40ab4a53cb8a6c0f62 (diff)
downloadgbm_gralloc-android-etnaviv.tar.gz
gbm_gralloc-android-etnaviv.tar.xz
Revert "HACK: dump usage flags"android-etnaviv
This reverts commit db167790a140c523531c2c40ab4a53cb8a6c0f62.
-rw-r--r--gralloc_gbm.cpp79
1 files changed, 0 insertions, 79 deletions
diff --git a/gralloc_gbm.cpp b/gralloc_gbm.cpp
index 6c4c96b..647eb75 100644
--- a/gralloc_gbm.cpp
+++ b/gralloc_gbm.cpp
@@ -46,79 +46,6 @@
#define unlikely(x) __builtin_expect(!!(x), 0)
-const char *usage_flags_str[] = {
- "GRALLOC_USAGE_SW_READ_NEVER",
- "GRALLOC_USAGE_SW_READ_RARELY",
- "GRALLOC_USAGE_SW_READ_OFTEN",
- "GRALLOC_USAGE_SW_READ_MASK",
- "GRALLOC_USAGE_SW_WRITE_NEVER",
- "GRALLOC_USAGE_SW_WRITE_RARELY",
- "GRALLOC_USAGE_SW_WRITE_OFTEN",
- "GRALLOC_USAGE_SW_WRITE_MASK",
- "GRALLOC_USAGE_HW_TEXTURE",
- "GRALLOC_USAGE_HW_RENDER",
- "GRALLOC_USAGE_HW_2D",
- "GRALLOC_USAGE_HW_COMPOSER",
- "GRALLOC_USAGE_HW_FB",
- "GRALLOC_USAGE_HW_VIDEO_ENCODER",
- "GRALLOC_USAGE_HW_CAMERA_WRITE",
- "GRALLOC_USAGE_HW_CAMERA_READ",
- "GRALLOC_USAGE_HW_CAMERA_ZSL",
- "GRALLOC_USAGE_HW_CAMERA_MASK",
- "GRALLOC_USAGE_HW_MASK",
- "GRALLOC_USAGE_RENDERSCRIPT",
- "GRALLOC_USAGE_EXTERNAL_DISP",
- "GRALLOC_USAGE_PROTECTED",
- "GRALLOC_USAGE_PRIVATE_0",
- "GRALLOC_USAGE_PRIVATE_1",
- "GRALLOC_USAGE_PRIVATE_2",
- "GRALLOC_USAGE_PRIVATE_3",
- "GRALLOC_USAGE_PRIVATE_MASK"
-};
-
-unsigned int usage_flags_id[] = {
- 0x00000000,
- 0x00000002,
- 0x00000003,
- 0x0000000F,
- 0x00000000,
- 0x00000020,
- 0x00000030,
- 0x000000F0,
- 0x00000100,
- 0x00000200,
- 0x00000400,
- 0x00000800,
- 0x00001000,
- 0x00010000,
- 0x00020000,
- 0x00040000,
- 0x00060000,
- 0x00060000,
- 0x00071F00,
- 0x00100000,
- 0x00002000,
- 0x00004000,
- 0x10000000,
- 0x20000000,
- 0x40000000,
- 0x80000000,
- 0xF0000000
-};
-
-static void dump_usage_flags(int usage)
-{
- const int buf_len = 1024;
- char *buf = (char *) calloc(1, buf_len);
- int nbr_flags = sizeof(usage_flags_id)/sizeof(usage_flags_id[0]);
- for(int i = 0; i < nbr_flags; i++) {
- if (usage & usage_flags_id[i]) {
- snprintf(buf, buf_len, "%s %s", buf, usage_flags_str[i]);
- }
- }
- ALOGE("%s: 0x%08x %s", __func__, usage, buf);
-}
-
static int32_t gralloc_gbm_pid = 0;
static uint32_t get_gbm_format(int format)
@@ -230,9 +157,6 @@ static struct gralloc_gbm_bo_t *gbm_alloc(struct gbm_device *gbm,
int usage = get_pipe_bind(handle->usage);
int width, height;
- ALOGE("%s", __func__);
- dump_usage_flags(handle->usage);
-
buf = new struct gralloc_gbm_bo_t();
if (!buf) {
ALOGE("failed to allocate pipe buffer");
@@ -541,9 +465,6 @@ int gralloc_gbm_bo_lock(struct gralloc_gbm_bo_t *bo,
int usage, int x, int y, int w, int h,
void **addr)
{
- ALOGE("%s() bo=%p x=%d y=%d w=%d h=%d addr=%p", __func__, bo, x, y, w, h, addr);
- dump_usage_flags(bo->handle->usage);
-
if ((bo->handle->usage & usage) != usage) {
/* make FB special for testing software renderer with */