diff options
author | Wen Chang Liu <wenchangliu@google.com> | 2023-03-03 04:04:12 +0000 |
---|---|---|
committer | Wen Chang Liu <wenchangliu@google.com> | 2023-03-09 10:51:09 +0000 |
commit | aeca58624947793d2ad16bf2aa45ed6b3c2aa6cd (patch) | |
tree | aeb884622f26537fb17aaa792cef018691cbb1e2 | |
parent | d9d2eb2bbad2c4309a09bd632cab108189c7959e (diff) |
Revert^2 "gralloc4: Warn about multifd PlaneLayout once"
955a611bb3a2ee61a706f22deb71cde7b0dbe96a
Bug: 237824580
Test: No display artifacts after camera shot
Change-Id: Ide4fd026014b54cb443d285f1036d88abde65e09
-rw-r--r-- | gralloc4/src/hidl_common/MapperMetadata.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gralloc4/src/hidl_common/MapperMetadata.cpp b/gralloc4/src/hidl_common/MapperMetadata.cpp index 1123270..fb79930 100644 --- a/gralloc4/src/hidl_common/MapperMetadata.cpp +++ b/gralloc4/src/hidl_common/MapperMetadata.cpp @@ -305,11 +305,15 @@ static android::status_t get_plane_layouts(const private_handle_t *handle, std:: int64_t sample_increment_in_bits = format_info.bpp[plane_index]; int64_t offset = handle->plane_info[plane_index].offset; - uint8_t fd_count = get_exynos_fd_count(base_format); - if (fd_count != 1) { - MALI_GRALLOC_LOGW("Offsets in plane layouts of multi-fd format (%s %" PRIu64 - ") are not reliable. This can lead to image corruption.", - format_name(base_format), handle->alloc_format); + static bool warn_multifd = true; + if (warn_multifd) { + uint8_t fd_count = get_exynos_fd_count(base_format); + if (fd_count != 1) { + warn_multifd = false; + MALI_GRALLOC_LOGW("Offsets in plane layouts of multi-fd format (%s %" PRIu64 + ") are not reliable. This can lead to image corruption.", + format_name(base_format), handle->alloc_format); + } } PlaneLayout layout = {.offsetInBytes = offset, |