summaryrefslogtreecommitdiff
path: root/gralloc4/src
diff options
context:
space:
mode:
authorYichi Chen <yichichen@google.com>2021-05-05 14:59:59 +0800
committerYichi Chen <yichichen@google.com>2021-05-10 15:16:07 +0800
commit1d0ac2d320891c829e21d5532fb50bdf4a8aee69 (patch)
treec8d6153d1b5d6323b0785a19acd8b8d0affc88bf /gralloc4/src
parent04198b0eb43d28aa4d8e4e985986b69c24d564d0 (diff)
downloadgchips-1d0ac2d320891c829e21d5532fb50bdf4a8aee69.tar.gz
gralloc4: Disable SBWC on Camera buffer when GPU is one of producers
GPU process is still involved in camera EAF and EIF handling. The patch respects to the GPU usage in the producer flag and disables SBWC accordingly. Bug: 186092174 Test: Enable Camera BlurRefinement with correct resolution Change-Id: I3b8715aaede8594296bfd31ca737b882bdb7b005
Diffstat (limited to 'gralloc4/src')
-rw-r--r--gralloc4/src/core/mali_gralloc_formats.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/gralloc4/src/core/mali_gralloc_formats.cpp b/gralloc4/src/core/mali_gralloc_formats.cpp
index 052cc75..38a35b5 100644
--- a/gralloc4/src/core/mali_gralloc_formats.cpp
+++ b/gralloc4/src/core/mali_gralloc_formats.cpp
@@ -1394,9 +1394,14 @@ uint32_t get_base_format(const uint64_t req_format,
{
base_format = HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M; //NV21M narrow
}
- else if ((producers & MALI_GRALLOC_PRODUCER_CAM) && (consumers == GOOGLE_GRALLOC_CONSUMER_MFC))
+ else if ((producers & MALI_GRALLOC_PRODUCER_CAM) &&
+ !(producers & MALI_GRALLOC_PRODUCER_GPU) &&
+ (consumers == GOOGLE_GRALLOC_CONSUMER_MFC))
{
- // Allocated buffer is SBWC compressed when MFC is the sole consumer for camera buffers
+ // Allocated camera buffer is SBWC compressed when
+ // 1. Camera is one of the producers
+ // 2. GPU is not one of the producers
+ // 3. MFC is the sole consumer
if (property_get_bool("debug.vendor.gpu.record_sbwc", true)) {
base_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_SBWC;
} else {