diff options
author | Ankit Goyal <layog@google.com> | 2022-09-23 22:28:09 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-09-23 22:28:09 +0000 |
commit | cfa85657a1011ab1b2a075fead2f718076e9fc3a (patch) | |
tree | 756484a8f6a2773088fa9ae4c5f46ac291c60fd6 | |
parent | 3d4627c7d531288f14cb05e850a531cbfd4eaa6b (diff) | |
parent | b952672cb8e18133837a3cdd580d9f3991b92213 (diff) | |
download | gchips-cfa85657a1011ab1b2a075fead2f718076e9fc3a.tar.gz |
Enable frontbuffer allocation am: b952672cb8
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/gchips/+/19945644
Change-Id: Id657aeb73f06ff351644baac6150c974a87805d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | gralloc4/src/core/mali_gralloc_bufferallocation.cpp | 17 | ||||
-rw-r--r-- | gralloc4/src/mali_gralloc_usages.h | 2 |
2 files changed, 2 insertions, 17 deletions
diff --git a/gralloc4/src/core/mali_gralloc_bufferallocation.cpp b/gralloc4/src/core/mali_gralloc_bufferallocation.cpp index 7656fcf..04bf7ed 100644 --- a/gralloc4/src/core/mali_gralloc_bufferallocation.cpp +++ b/gralloc4/src/core/mali_gralloc_bufferallocation.cpp @@ -476,7 +476,7 @@ static void update_yv12_stride(int8_t plane, * (matched against `VALID_USAGE`). These should be aligned. */ static bool log_deprecated_usage_flags(uint64_t usage) { - if (usage & MALI_GRALLOC_USAGE_FRONTBUFFER) { + if (usage & DEPRECATED_MALI_GRALLOC_USAGE_FRONTBUFFER) { MALI_GRALLOC_LOGW("Using deprecated FRONTBUFFER usage bit, please upgrade to BufferUsage::FRONT_BUFFER"); return true; } @@ -980,16 +980,6 @@ static int prepare_descriptor_exynos_formats( return 0; } -static bool validate_usage(const uint64_t usage) { - if (usage & GRALLOC_USAGE_FRONT_BUFFER) { - /* TODO(b/218383959): Enable front buffer rendering */ - MALI_GRALLOC_LOGW("Front buffer rendering is disabled."); - return false; - } - - return true; -} - int mali_gralloc_derive_format_and_size(buffer_descriptor_t * const bufDescriptor) { alloc_type_t alloc_type{}; @@ -998,11 +988,6 @@ int mali_gralloc_derive_format_and_size(buffer_descriptor_t * const bufDescripto int alloc_height = bufDescriptor->height; uint64_t usage = bufDescriptor->producer_usage | bufDescriptor->consumer_usage; - if (!validate_usage(usage)) { - MALI_GRALLOC_LOGE("Usage flag validation failed."); - return -EINVAL; - } - /* * Select optimal internal pixel format based upon * usage and requested format. diff --git a/gralloc4/src/mali_gralloc_usages.h b/gralloc4/src/mali_gralloc_usages.h index fb3b70e..3c5a0fa 100644 --- a/gralloc4/src/mali_gralloc_usages.h +++ b/gralloc4/src/mali_gralloc_usages.h @@ -60,7 +60,7 @@ namespace aidl_common = aidl::android::hardware::graphics::common; // TODO(b/183478446): Cleanup usage flags redefinition typedef enum { - MALI_GRALLOC_USAGE_FRONTBUFFER = GRALLOC_USAGE_PRIVATE_12, + DEPRECATED_MALI_GRALLOC_USAGE_FRONTBUFFER = GRALLOC_USAGE_PRIVATE_12, MALI_GRALLOC_USAGE_FORCE_BACKBUFFER = GRALLOC_USAGE_PRIVATE_13, MALI_GRALLOC_USAGE_NO_AFBC = GRALLOC_USAGE_PRIVATE_1, MALI_GRALLOC_USAGE_AFBC_PADDING = GRALLOC_USAGE_PRIVATE_14, |