summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gralloc4/src/core/mali_gralloc_bufferallocation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gralloc4/src/core/mali_gralloc_bufferallocation.cpp b/gralloc4/src/core/mali_gralloc_bufferallocation.cpp
index 289db0b..19c2a21 100644
--- a/gralloc4/src/core/mali_gralloc_bufferallocation.cpp
+++ b/gralloc4/src/core/mali_gralloc_bufferallocation.cpp
@@ -49,6 +49,7 @@
/* IP-specific align values */
#define GPU_BYTE_ALIGN_DEFAULT 64
+#define BIG_BYTE_ALIGN_DEFAULT 64
#ifdef SOC_ZUMA
#define CAMERA_RAW_BUFFER_BYTE_ALIGN 32
#endif
@@ -622,6 +623,11 @@ static void calc_allocation_size(const int width,
}
#endif
+ if (has_BIG_usage) {
+ assert(has_hw_usage);
+ hw_align = lcm(hw_align, static_cast<uint16_t>(BIG_BYTE_ALIGN_DEFAULT));
+ }
+
uint32_t cpu_align = 0;
if (has_cpu_usage && format.id != MALI_GRALLOC_FORMAT_INTERNAL_RAW10) {
assert((format.bpp[plane] * format.align_w_cpu) % 8 == 0);