summaryrefslogtreecommitdiff
path: root/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
diff options
context:
space:
mode:
authorTomasz Wasilczyk <twasilczyk@google.com>2023-10-03 01:21:26 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-03 01:21:26 +0000
commit87fb2ec3fabf929385d5fd0d6dc185e717fef606 (patch)
tree54e0796e7d03b2ac986d58a965fa93a72a39790f /libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
parent21fc95f9414ee12e8d9c0b3257f8429f919f0628 (diff)
parent52dd0d81fbe18acaabafd347f743aa87132a87ca (diff)
downloadgs101-87fb2ec3fabf929385d5fd0d6dc185e717fef606.tar.gz
Don't depend on String8 cast to C string am: 8acdce346b am: c943f58653 am: cb3b13b334 am: 52dd0d81fb
Original change: https://android-review.googlesource.com/c/platform/hardware/google/graphics/gs101/+/2749177 Change-Id: I7cda1311c15f9e15770dd5f48c91ac51292fd715 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp')
-rw-r--r--libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
index 30a5b07..e21999c 100644
--- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
+++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
@@ -976,7 +976,9 @@ uint32_t ExynosPrimaryDisplayModule::getAtcLuxMapIndex(std::vector<atc_lux_map>
int32_t ExynosPrimaryDisplayModule::setAtcStrength(uint32_t strength) {
mAtcStrength.value.store(strength);
if (mAtcStrength.value.is_dirty()) {
- if (writeIntToFile(mAtcStrength.node, mAtcStrength.value.get()) != NO_ERROR) return -EPERM;
+ if (writeIntToFile(mAtcStrength.node.c_str(), mAtcStrength.value.get()) != NO_ERROR) {
+ return -EPERM;
+ }
mAtcStrength.value.clear_dirty();
}
return NO_ERROR;
@@ -985,7 +987,7 @@ int32_t ExynosPrimaryDisplayModule::setAtcStrength(uint32_t strength) {
int32_t ExynosPrimaryDisplayModule::setAtcAmbientLight(uint32_t ambient_light) {
mAtcAmbientLight.value.store(ambient_light);
if (mAtcAmbientLight.value.is_dirty()) {
- if (writeIntToFile(mAtcAmbientLight.node, mAtcAmbientLight.value.get()) != NO_ERROR)
+ if (writeIntToFile(mAtcAmbientLight.node.c_str(), mAtcAmbientLight.value.get()) != NO_ERROR)
return -EPERM;
mAtcAmbientLight.value.clear_dirty();
}
@@ -1004,7 +1006,7 @@ int32_t ExynosPrimaryDisplayModule::setAtcMode(std::string mode_name) {
for (auto it = kAtcSubSetting.begin(); it != kAtcSubSetting.end(); it++) {
mAtcSubSetting[it->first.c_str()].value.store(mode.sub_setting[it->first.c_str()]);
if (mAtcSubSetting[it->first.c_str()].value.is_dirty()) {
- if (writeIntToFile(mAtcSubSetting[it->first.c_str()].node,
+ if (writeIntToFile(mAtcSubSetting[it->first.c_str()].node.c_str(),
mAtcSubSetting[it->first.c_str()].value.get()) != NO_ERROR)
return -EPERM;
mAtcSubSetting[it->first.c_str()].value.clear_dirty();
@@ -1166,7 +1168,7 @@ int32_t ExynosPrimaryDisplayModule::setAtcStDimming(uint32_t value) {
int32_t ExynosPrimaryDisplayModule::setAtcEnable(bool enable) {
mAtcEnable.value.store(enable);
if (mAtcEnable.value.is_dirty()) {
- if (writeIntToFile(mAtcEnable.node, enable) != NO_ERROR) return -EPERM;
+ if (writeIntToFile(mAtcEnable.node.c_str(), enable) != NO_ERROR) return -EPERM;
mAtcEnable.value.clear_dirty();
}
return NO_ERROR;