summaryrefslogtreecommitdiff
path: root/libhwc2.1/libresource/ExynosResourceManager.cpp
diff options
context:
space:
mode:
authorHyunKyung Kim <hk310.kim@samsung.com>2020-05-12 19:53:13 +0900
committerHyunKyung Kim <hk310.kim@samsung.com>2020-06-17 10:31:04 +0900
commitcde67e1e84bd2764bd1ef7e116946064d20fa12d (patch)
tree343d7603118e1df599218eabb0c9ef572978472a /libhwc2.1/libresource/ExynosResourceManager.cpp
parent5bd2f103c1290cb7a6f138f41d89207e5b258d6d (diff)
libhwc2.1: Add uncompressed YUV format to candidate of m2m output
SBWC format has dst crop alignment restriction so SBWC format could not be supported by m2mMPP in some dst size. This patch adds additional uncompressed YUV format to candidate list for m2m ouput to cover this case. SBWC format would be used only if there is m2mMPP that can support dst crop size and uncompressed YUV format would be used if there is no m2mMPP that can support dst crop size. Change-Id: Ibfc19302f458bbf3a776142221612d13d80763ce Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
Diffstat (limited to 'libhwc2.1/libresource/ExynosResourceManager.cpp')
-rw-r--r--libhwc2.1/libresource/ExynosResourceManager.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/libhwc2.1/libresource/ExynosResourceManager.cpp b/libhwc2.1/libresource/ExynosResourceManager.cpp
index 4f5929b..ee1ea13 100644
--- a/libhwc2.1/libresource/ExynosResourceManager.cpp
+++ b/libhwc2.1/libresource/ExynosResourceManager.cpp
@@ -1220,6 +1220,15 @@ int32_t ExynosResourceManager::getCandidateM2mMPPOutImages(ExynosDisplay *displa
dst_img.x, dst_img.y, dst_img.w, dst_img.h,
dst_scale_img.x, dst_scale_img.y, dst_scale_img.w, dst_scale_img.h);
image_lists[index++] = dst_scale_img;
+
+ if (isFormatSBWC(dst_scale_img.format)) {
+ /*
+ * SBWC format could not be supported in specific dst size
+ * Add uncompressed YUV format to cover this size
+ */
+ dst_scale_img.format = DEFAULT_MPP_DST_UNCOMP_YUV_FORMAT;
+ image_lists[index++] = dst_scale_img;
+ }
}
}
@@ -1265,6 +1274,14 @@ int32_t ExynosResourceManager::getCandidateM2mMPPOutImages(ExynosDisplay *displa
}
image_lists[index++] = dst_img;
+ if (isFormatSBWC(dst_img.format)) {
+ /*
+ * SBWC format could not be supported in specific dst size
+ * Add uncompressed YUV format to cover this size
+ */
+ dst_img.format = DEFAULT_MPP_DST_UNCOMP_YUV_FORMAT;
+ image_lists[index++] = dst_img;
+ }
/* For G2D HDR case */
if (hasHdrInfo(src_img)) {