summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2020-09-17 06:06:26 +0000
committerJohn Stultz <john.stultz@linaro.org>2020-09-17 22:10:25 +0000
commit48ce23715a5f3cf094e014922d9110462791458c (patch)
tree27efd70201133d4902b4a7a35408edf5883e1092
parentdcb54d425ae6a6688584b814f41d82f1c74d01c8 (diff)
gbm_gralloc: Sync with upstream project
This syncs the gralloc dir with the upstream gbm_gralloc project here: https://github.com/robherring/gbm_gralloc As of commit cecd1a2c8504 ("gralloc_gbm: Quiet logcat verbosity") with the exception of Android.mk to which necessary local AOSP changes have been made. Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: If845e8cbe144db6df90a2c5eb3e844f361ece7ec
-rw-r--r--gralloc/gralloc.cpp2
-rw-r--r--gralloc/gralloc_gbm.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/gralloc/gralloc.cpp b/gralloc/gralloc.cpp
index c71e901..1cc9f55 100644
--- a/gralloc/gralloc.cpp
+++ b/gralloc/gralloc.cpp
@@ -24,7 +24,7 @@
#define LOG_TAG "GRALLOC-GBM"
-#include <cutils/log.h>
+#include <log/log.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
diff --git a/gralloc/gralloc_gbm.cpp b/gralloc/gralloc_gbm.cpp
index bdb41b8..29d11cd 100644
--- a/gralloc/gralloc_gbm.cpp
+++ b/gralloc/gralloc_gbm.cpp
@@ -24,11 +24,12 @@
#define LOG_TAG "GRALLOC-GBM"
-#include <cutils/log.h>
+#include <log/log.h>
#include <cutils/atomic.h>
#include <cutils/properties.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -382,8 +383,7 @@ buffer_handle_t gralloc_gbm_bo_create(struct gbm_device *gbm,
gbm_bo_handle_map.emplace(handle, bo);
/* in pixels */
- struct gralloc_handle_t *ghandle = gralloc_handle(handle);
- *stride = ghandle->stride / gralloc_gbm_get_bpp(format);
+ *stride = gralloc_handle(handle)->stride / gralloc_gbm_get_bpp(format);
return handle;
}
@@ -420,7 +420,7 @@ int gralloc_gbm_bo_lock(buffer_handle_t handle,
gbm_bo_set_user_data(bo, bo_data, gralloc_gbm_destroy_user_data);
}
- ALOGI("lock bo %p, cnt=%d, usage=%x", bo, bo_data->lock_count, usage);
+ ALOGV("lock bo %p, cnt=%d, usage=%x", bo, bo_data->lock_count, usage);
/* allow multiple locks with compatible usages */
if (bo_data->lock_count && (bo_data->locked_for & usage) != usage)
@@ -491,10 +491,10 @@ int gralloc_gbm_bo_lock_ycbcr(buffer_handle_t handle,
{
struct gralloc_handle_t *hnd = gralloc_handle(handle);
int ystride, cstride;
- void *addr;
+ void *addr = 0;
int err;
- ALOGD("handle %p, hnd %p, usage 0x%x", handle, hnd, usage);
+ ALOGV("handle %p, hnd %p, usage 0x%x", handle, hnd, usage);
err = gralloc_gbm_bo_lock(handle, usage, x, y, w, h, &addr);
if (err)