diff options
author | Ankit Goyal <layog@google.com> | 2023-04-27 22:17:28 -0700 |
---|---|---|
committer | Ankit Goyal <layog@google.com> | 2023-05-08 23:18:17 +0000 |
commit | 35314f9c5305057a840b8f99037defa563dbf561 (patch) | |
tree | fedcd02f1823e324eebeddfdc63c319d9bf5098f | |
parent | b0be346e9410a9fc97f4e4cb8f089d502264f864 (diff) | |
download | gchips-35314f9c5305057a840b8f99037defa563dbf561.tar.gz |
Align with 64 for BO/BW
Fix: 271524577
Fix: 270022482
Test: gfx-gralloc-alloc-test
Test: CtsMediaV2TestCases
Change-Id: I6dba38d58d9e76fce8afe822f73af0049c8eb226
-rw-r--r-- | gralloc4/src/core/mali_gralloc_bufferallocation.cpp | 6 |
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); |