diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-11-13 06:23:22 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-11-13 06:23:22 -0800 |
commit | 42881b1ca8d58a4c49d209a23f0434e982ebf5b5 (patch) | |
tree | ea329208b29bd096a047f3e763d6bca61d2ae950 /sdm | |
parent | 390b46f29eb77faac1532d21526816e2b43f600c (diff) | |
parent | dec4e70a66f0ffdf9d6df49cd83f875435b8e9dd (diff) | |
download | display-42881b1ca8d58a4c49d209a23f0434e982ebf5b5.tar.gz |
Merge "hwc2: Check and return valid error from ControlIdlePowerCollapse"
Diffstat (limited to 'sdm')
-rw-r--r-- | sdm/libs/hwc2/hwc_session_services.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sdm/libs/hwc2/hwc_session_services.cpp b/sdm/libs/hwc2/hwc_session_services.cpp index 519346f0..90ed00b4 100644 --- a/sdm/libs/hwc2/hwc_session_services.cpp +++ b/sdm/libs/hwc2/hwc_session_services.cpp @@ -524,8 +524,8 @@ Return<int32_t> HWCSession::controlIdlePowerCollapse(bool enable, bool synchrono if (!idle_pc_ref_cnt_) { HWC2::Error err = hwc_display_[HWC_DISPLAY_PRIMARY]->ControlIdlePowerCollapse(enable, synchronous); - if (err != HWC2::Error::None) { - return -EINVAL; + if (err == HWC2::Error::Unsupported) { + return 0; } Refresh(HWC_DISPLAY_PRIMARY); int32_t error = locker_[HWC_DISPLAY_PRIMARY].WaitFinite(kCommitDoneTimeoutMs); @@ -540,8 +540,8 @@ Return<int32_t> HWCSession::controlIdlePowerCollapse(bool enable, bool synchrono if (!(idle_pc_ref_cnt_ - 1)) { HWC2::Error err = hwc_display_[HWC_DISPLAY_PRIMARY]->ControlIdlePowerCollapse(enable, synchronous); - if (err != HWC2::Error::None) { - return -EINVAL; + if (err == HWC2::Error::Unsupported) { + return 0; } DLOGI("Idle PC enabled!!"); } |