summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongWook Shin <yongwook.shin@samsung.com>2022-10-20 17:27:13 +0900
committerWiwit Rifa'i <wiwitrifai@google.com>2023-03-21 15:05:29 +0800
commit7dc8a32a399b245152b2486fa28d5f3e8fadf402 (patch)
treef73d1575480bd0cf7feec949d7f672f1558f159a
parent8fb86c4886735839181951cc5875a0d4972636da (diff)
downloadzuma-7dc8a32a399b245152b2486fa28d5f3e8fadf402.tar.gz
libhwc2.1: update compression info
Compression info is updated in common codes. It updates Zuma codes based on updated compression info. Bug: 253121964 Test: boot to home Signed-off-by: YongWook Shin <yongwook.shin@samsung.com> Change-Id: I58bd97a7abfec940243fdac13b478b798ab46bb9
-rw-r--r--libhwc2.1/libresource/ExynosResourceManagerModule.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
index 5cc11c7..067fb86 100644
--- a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
+++ b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
@@ -271,7 +271,7 @@ uint32_t ExynosResourceManagerModule::calculateHWResourceAmount(ExynosDisplay *d
HDEBUGLOGD(eDebugTDM, "mppSrc(%p) SRAM calculation start", mppSrc->mSrcImg.bufferHandle);
int32_t transform = mppSrc->mSrcImg.transform;
- int32_t compressed = mppSrc->mSrcImg.compressed;
+ int32_t compressType = mppSrc->mSrcImg.compressionInfo.type;
bool rotation = (transform & HAL_TRANSFORM_ROT_90) ? true : false;
int32_t width = mppSrc->mSrcImg.w;
@@ -301,7 +301,7 @@ uint32_t ExynosResourceManagerModule::calculateHWResourceAmount(ExynosDisplay *d
if (rotation) {
width = height;
/* Rotation amount, Only YUV rotation is supported */
- if (isFormatSBWC(format)) {
+ if (compressType == COMP_TYPE_SBWC) {
/* Y and UV width should be aligned and should get sram for each Y and UV */
int32_t width_y = pixel_align(width + kSramSBWCRotWidthAlign, kSramSBWCRotWidthAlign);
int32_t width_c =
@@ -330,9 +330,9 @@ uint32_t ExynosResourceManagerModule::calculateHWResourceAmount(ExynosDisplay *d
}
HDEBUGLOGD(eDebugTDM, "+ rotation : %d", SRAMtotal);
} else {
- if (isFormatSBWC(format)) {
+ if (compressType == COMP_TYPE_SBWC) {
width = pixel_align(width + kSramSBWCWidthMargin, kSramSBWCWidthAlign);
- } else if (compressed) {
+ } else if (compressType == COMP_TYPE_AFBC) {
/* Align for 8,4Byte/pixel formats */
if (formatToBpp(format) > 16) {
width = pixel_align(width + kSramAFBC8B4BMargin, kSramAFBC8B4BAlign);
@@ -344,7 +344,7 @@ uint32_t ExynosResourceManagerModule::calculateHWResourceAmount(ExynosDisplay *d
widthIndex = findWidthIndex(width);
/* AFBC amount */
- if (compressed) {
+ if (compressType == COMP_TYPE_AFBC) {
formatIndex = (isFormatRgb(format) ? RGB : 0) | formatBPP;
if (sramAmountMap.find(sramAmountParams(TDM_ATTR_AFBC, formatIndex, widthIndex)) !=
sramAmountMap.end())
@@ -354,7 +354,7 @@ uint32_t ExynosResourceManagerModule::calculateHWResourceAmount(ExynosDisplay *d
}
/* SBWC amount */
- if (isFormatSBWC(format)) {
+ if (compressType == COMP_TYPE_SBWC) {
if (sramAmountMap.find(sramAmountParams(TDM_ATTR_SBWC, SBWC_Y, widthIndex)) !=
sramAmountMap.end())
SRAMtotal += sramAmountMap.at(sramAmountParams(TDM_ATTR_SBWC, SBWC_Y, widthIndex));