summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Wasilczyk <twasilczyk@google.com>2023-09-15 19:17:18 +0000
committerTomasz Wasilczyk <twasilczyk@google.com>2023-09-15 19:51:54 +0000
commitba7ce88f554c4e45bb18079f6ecb8820f7c14fff (patch)
tree0dab0b0d27b5b289310709f72ce4e8fc28b428a0
parentdc44bfee58bcb707ac330bbce2cdb59745a57d66 (diff)
downloadzuma-ba7ce88f554c4e45bb18079f6ecb8820f7c14fff.tar.gz
Use String8/16 c_str
Bug: 295394788 Test: m libexynosdisplay Change-Id: I83f24914c9db7cab6d00256dd1b849c8cd077b4a Merged-In: I83f24914c9db7cab6d00256dd1b849c8cd077b4a
-rw-r--r--libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp14
-rw-r--r--libhwc2.1/libresource/ExynosResourceManagerModule.cpp45
2 files changed, 29 insertions, 30 deletions
diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
index 36d3f93..be36f66 100644
--- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
+++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
@@ -22,14 +22,14 @@
#include "ExynosHWCHelper.h"
-#define OP_MANAGER_LOGD(msg, ...) \
- ALOGD("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.string(), __func__, \
+#define OP_MANAGER_LOGD(msg, ...) \
+ ALOGD("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.c_str(), __func__, \
##__VA_ARGS__)
-#define OP_MANAGER_LOGI(msg, ...) \
- ALOGI("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.string(), __func__, \
+#define OP_MANAGER_LOGI(msg, ...) \
+ ALOGI("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.c_str(), __func__, \
##__VA_ARGS__)
-#define OP_MANAGER_LOGE(msg, ...) \
- ALOGE("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.string(), __func__, \
+#define OP_MANAGER_LOGE(msg, ...) \
+ ALOGE("[%s] OperationRateManager::%s:" msg, mDisplay->mDisplayName.c_str(), __func__, \
##__VA_ARGS__)
using namespace zuma;
@@ -242,5 +242,5 @@ void ExynosPrimaryDisplayModule::checkPreblendingRequirement() {
for (size_t i = 0; i < mLayers.size(); ++i) {
count += checkPreblending(i, mLayers[i]);
}
- DISPLAY_LOGD(eDebugTDM, "disp(%d),cnt=%d%s", mDisplayId, count, log.string());
+ DISPLAY_LOGD(eDebugTDM, "disp(%d),cnt=%d%s", mDisplayId, count, log.c_str());
}
diff --git a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
index afb5efd..b53fbc7 100644
--- a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
+++ b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
@@ -59,7 +59,7 @@ bool ExynosResourceManagerModule::checkTDMResource(ExynosDisplay *display, Exyno
const uint32_t blkId = currentMPP->getHWBlockId();
const uint32_t axiId = currentMPP->getAXIPortId();
HDEBUGLOGD(eDebugTDM, "%s : %p trying to assign to %s, compare with layers", __func__,
- mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string());
+ mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str());
ExynosLayer *layer = (mppSrc->mSourceType == MPP_SOURCE_LAYER) ? (ExynosLayer *)mppSrc : nullptr;
for (auto compLayer : display->mLayers) {
@@ -72,7 +72,7 @@ bool ExynosResourceManagerModule::checkTDMResource(ExynosDisplay *display, Exyno
if (display->mExynosCompositionInfo.mHasCompositionLayer) {
HDEBUGLOGD(eDebugTDM,
"%s : %p trying to assign to %s, compare with ExynosComposition Target buffer",
- __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string());
+ __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str());
ExynosMPP *otfMPP = display->mExynosCompositionInfo.mOtfMPP;
if (otfMPP)
getAmounts(display, blkId, axiId, otfMPP, mppSrc, &display->mExynosCompositionInfo,
@@ -82,7 +82,7 @@ bool ExynosResourceManagerModule::checkTDMResource(ExynosDisplay *display, Exyno
if (display->mClientCompositionInfo.mHasCompositionLayer) {
HDEBUGLOGD(eDebugTDM,
"%s : %p trying to assign to %s, compare with ClientComposition Target buffer",
- __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string());
+ __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str());
ExynosMPP *otfMPP = display->mClientCompositionInfo.mOtfMPP;
if (otfMPP)
getAmounts(display, blkId, axiId, otfMPP, mppSrc, &display->mClientCompositionInfo,
@@ -101,18 +101,18 @@ bool ExynosResourceManagerModule::checkTDMResource(ExynosDisplay *display, Exyno
display->mDisplayTDMInfo[TDMInfoIdx].getAvailableAmount(attr->first).totalAmount;
HDEBUGLOGD(eDebugTDM,
"%s, layer[%p] -> %s attr[%s],ls=%d,accumulated:%d,current:%d,total: %d",
- __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string(),
- attr->second.name.string(), loadSharing, accumulatedAmount[attr->first],
+ __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str(),
+ attr->second.name.c_str(), loadSharing, accumulatedAmount[attr->first],
currentAmount, totalAmount);
if (accumulatedAmount[attr->first] + currentAmount > totalAmount) {
HDEBUGLOGD(eDebugTDM, "%s, %s could not assigned by attr[%s]", __func__,
- currentMPP->mName.string(), attr->second.name.string());
+ currentMPP->mName.c_str(), attr->second.name.c_str());
return false;
}
}
HDEBUGLOGD(eDebugTDM, "%s : %p trying to assign to %s successfully", __func__,
- mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string());
+ mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str());
return true;
}
@@ -136,7 +136,7 @@ bool ExynosResourceManagerModule::isHWResourceAvailable(ExynosDisplay *display,
if (overlappedLayers.size()) {
HDEBUGLOGD(eDebugTDM,
"%s : %p trying to assign to %s, check its overlapped layers(%zu) status",
- __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.string(),
+ __func__, mppSrc->mSrcImg.bufferHandle, currentMPP->mName.c_str(),
overlappedLayers.size());
for (auto &overlappedLayer : overlappedLayers) {
@@ -172,16 +172,15 @@ void ExynosResourceManagerModule::setupHWResource(const tdm_attr_t &tdmAttrId, c
tdmAttrId);
if (addedDisplay == nullptr) {
HDEBUGLOGD(eDebugTDM, "(%s=>%s) : %s amount is updated to %d",
- resourceIdx.toString8().string(), iter->first.toString8().string(),
- name.string(), amount);
+ resourceIdx.toString8().c_str(), iter->first.toString8().c_str(),
+ name.c_str(), amount);
} else {
- HDEBUGLOGD(eDebugTDM,
- "(%s=>%s) : hwResource.totalAmount=%d %s amount is updated to %d",
- resourceIdx.toString8().string(), iter->first.toString8().string(),
- hwResource.totalAmount, name.string(), amount);
+ HDEBUGLOGD(eDebugTDM, "(%s=>%s) : hwResource.totalAmount=%d %s amount is updated to %d",
+ resourceIdx.toString8().c_str(), iter->first.toString8().c_str(),
+ hwResource.totalAmount, name.c_str(), amount);
}
} else {
- ALOGW("(%s): cannot find resource for %s", resourceIdx.toString8().string(), name.string());
+ ALOGW("(%s): cannot find resource for %s", resourceIdx.toString8().c_str(), name.c_str());
}
}
@@ -231,7 +230,7 @@ uint32_t ExynosResourceManagerModule::setDisplaysTDMInfo()
.getAvailableAmount(attr->first)
.totalAmount;
HDEBUGLOGD(eDebugTDM, "%s : [%s] display:%d,block:%d, amount : %d(%s)",
- __func__, attr->second.name.string(), display->mType,
+ __func__, attr->second.name.c_str(), display->mType,
blockId->first, amount,
display->isEnabled() ? "used" : "not used");
} else {
@@ -242,7 +241,7 @@ uint32_t ExynosResourceManagerModule::setDisplaysTDMInfo()
.totalAmount;
HDEBUGLOGD(eDebugTDM,
"%s : [%s] display:%d,block:%d,axi:%d, amount:%d(%s)",
- __func__, attr->second.name.string(), display->mType,
+ __func__, attr->second.name.c_str(), display->mType,
blockId->first, axi->first, amount,
display->isEnabled() ? "used" : "not used");
}
@@ -558,7 +557,7 @@ int32_t ExynosResourceManagerModule::otfMppReordering(ExynosDisplay *display,
}
HDEBUGLOGD(eDebugLoadBalancing, "%s: %s is assigned (AFBC:%d, WCG:%d), is %s", __func__,
- mpp->mName.string(), isAFBC, isWCG,
+ mpp->mName.c_str(), isAFBC, isWCG,
(mppSrc->mSourceType == MPP_SOURCE_LAYER) ? "Layer" : "Client Target");
usedBlockCount[bId]++;
usedAXIPortCount[aId]++;
@@ -577,10 +576,10 @@ int32_t ExynosResourceManagerModule::otfMppReordering(ExynosDisplay *display,
String8 after;
for (uint32_t i = 0; i < otfMPPs.size(); i++) {
ExynosMPPModule *mpp = (ExynosMPPModule *)otfMPPs[i];
- after.appendFormat("%s) ->", mpp->mName.string());
+ after.appendFormat("%s) ->", mpp->mName.c_str());
}
- HDEBUGLOGD(eDebugLoadBalancing, "%s %p, %s", __func__, src.bufferHandle, after.string());
+ HDEBUGLOGD(eDebugLoadBalancing, "%s %p, %s", __func__, src.bufferHandle, after.c_str());
return 0;
}
@@ -615,12 +614,12 @@ uint32_t ExynosResourceManagerModule::getAmounts(ExynosDisplay *display,
if (currentBlockId == blockId && isOverlapped(display, curSrc, compSrc)) {
String8 log;
if (hwcCheckDebugMessages(eDebugTDM)) {
- log.appendFormat("%s", compOtfMPP->mName.string());
+ log.appendFormat("%s", compOtfMPP->mName.c_str());
}
for (auto attr = HWAttrs.begin(); attr != HWAttrs.end(); attr++) {
uint32_t compareAmount = compSrc->getHWResourceAmount(attr->first);
if (hwcCheckDebugMessages(eDebugTDM)) {
- log.appendFormat(", attr %s DPUF-%d(+ %d)", attr->second.name.string(),
+ log.appendFormat(", attr %s DPUF-%d(+ %d)", attr->second.name.c_str(),
DPUFAmounts[attr->first], compareAmount);
}
DPUFAmounts[attr->first] += compareAmount;
@@ -631,7 +630,7 @@ uint32_t ExynosResourceManagerModule::getAmounts(ExynosDisplay *display,
AXIAmounts[attr->first] += compareAmount;
}
}
- HDEBUGLOGD(eDebugTDM, "%s %s", __func__, log.string());
+ HDEBUGLOGD(eDebugTDM, "%s %s", __func__, log.c_str());
}
return 0;