diff options
author | Ankit Goyal <layog@google.com> | 2023-03-01 16:56:10 -0800 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-02 20:34:50 +0000 |
commit | 545457b6a334e28f6f0d447f20037d37ec562f5e (patch) | |
tree | 344a1d2f5bf5814b065ad793b2a03aba2df4adbe | |
parent | 3c98ac4c6b5023d7599cb4b549330fd8972c641f (diff) |
Revert "Revert "Revert "Remove hack of offset calculation from exynos formats"""
This reverts commit 2818a8cfe88388af03c45806e1fc8074335a1aba.
Bug: 269705937
Test: No display artifacts after camera shot
Change-Id: If74e97dda9dad7b63ae145386b76d9d8f6d14ee4
(cherry picked from commit e2735b6fde12fd39386d897c46c796b01fce8dd3)
Merged-In: If74e97dda9dad7b63ae145386b76d9d8f6d14ee4
-rw-r--r-- | gralloc4/src/hidl_common/MapperMetadata.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gralloc4/src/hidl_common/MapperMetadata.cpp b/gralloc4/src/hidl_common/MapperMetadata.cpp index 7cd4c92..cb0a820 100644 --- a/gralloc4/src/hidl_common/MapperMetadata.cpp +++ b/gralloc4/src/hidl_common/MapperMetadata.cpp @@ -304,6 +304,12 @@ 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; + // TODO(b/182885532): Allocate the complete buffer contiguously + if (handle->plane_info[plane_index].fd_idx == plane_index) + { + offset = (int64_t)handle->bases[plane_index] - handle->bases[0]; + } + PlaneLayout layout = {.offsetInBytes = offset, .sampleIncrementInBits = sample_increment_in_bits, .strideInBytes = handle->plane_info[plane_index].byte_stride, |