summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-04-01 04:56:04 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-04-01 04:56:04 +0000
commit5e6d9c58edcfea3966ce4972abb3b247245d4bbb (patch)
tree258b6987565988c6485a8bd0b08c81f5a19b9d18
parent8c00a6dac4758123451f7fd5cf277edd43da61d4 (diff)
parentbe0d3d7fc36085be615de0a476c092871e1f8043 (diff)
downloadzuma-5e6d9c58edcfea3966ce4972abb3b247245d4bbb.tar.gz
Snap for 9867398 from be0d3d7fc36085be615de0a476c092871e1f8043 to udc-d1-release
Change-Id: I43900765cd29a89fc7517f13c15bbcc8e3864df9
-rw-r--r--libhwc2.1/libresource/ExynosResourceManagerModule.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
index 5cc11c7..0602db8 100644
--- a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
+++ b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
@@ -46,8 +46,6 @@ ExynosResourceManagerModule::ExynosResourceManagerModule(ExynosDevice *device)
const int socRev = atoi(value);
mConstraintRev = socRev < 2 ? CONSTRAINT_A0 : CONSTRAINT_B0;
ALOGD("%s(): ro.boot.hw.soc.rev=%s ConstraintRev=%d", __func__, value, mConstraintRev);
- // TODO (b/266048745): Revert once G2D HDR code for zuma is merged
- mM2mMPPs.clear();
}
ExynosResourceManagerModule::~ExynosResourceManagerModule() {}
@@ -271,7 +269,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 +299,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 +328,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 +342,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 +352,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));