diff options
author | Adam Shih <adamshih@google.com> | 2018-12-04 15:13:02 +0800 |
---|---|---|
committer | Adam Shih <adamshih@google.com> | 2018-12-04 15:14:42 +0800 |
commit | 9116539540d9f8f3975b0df2f2c6751e63a79050 (patch) | |
tree | 7470feae96fc180772b804e3d07c0544564b4112 | |
parent | f475c154f487ec03c3516dd58488f28d37ab3a5f (diff) | |
parent | 6826432f5a89942e534ec15ca856aaa8329aec9d (diff) | |
download | android_hardware_qcom_sdm710_display-9116539540d9f8f3975b0df2f2c6751e63a79050.tar.gz android_hardware_qcom_sdm710_display-9116539540d9f8f3975b0df2f2c6751e63a79050.tar.bz2 android_hardware_qcom_sdm710_display-9116539540d9f8f3975b0df2f2c6751e63a79050.zip |
Merge remote-tracking branch 'goog/qcom/release/LA.UM.7.8.9.08.00.00.478.137' into pi-dev
Bug: 120390132
Change-Id: I5e4edd6e3a484313dd220c48ed5ef2123bc317d4
-rw-r--r-- | sdm/libs/core/display_base.cpp | 1 | ||||
-rw-r--r-- | sdm/libs/core/drm/hw_device_drm.cpp | 6 | ||||
-rw-r--r-- | sdm/libs/core/drm/hw_device_drm.h | 1 | ||||
-rw-r--r-- | sdm/libs/hwc2/hwc_display.cpp | 4 | ||||
-rw-r--r-- | sdm/libs/hwc2/hwc_session_services.cpp | 8 |
5 files changed, 16 insertions, 4 deletions
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp index 67f7ac83..e5f61c15 100644 --- a/sdm/libs/core/display_base.cpp +++ b/sdm/libs/core/display_base.cpp @@ -1299,6 +1299,7 @@ void DisplayBase::CommitLayerParams(LayerStack *layer_stack) { hw_layer.input_buffer.size = sdm_layer->input_buffer.size; hw_layer.input_buffer.acquire_fence_fd = sdm_layer->input_buffer.acquire_fence_fd; hw_layer.input_buffer.handle_id = sdm_layer->input_buffer.handle_id; + hw_layer.input_buffer.buffer_id = sdm_layer->input_buffer.buffer_id; } return; diff --git a/sdm/libs/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp index 627e0080..40e0b220 100644 --- a/sdm/libs/core/drm/hw_device_drm.cpp +++ b/sdm/libs/core/drm/hw_device_drm.cpp @@ -1047,6 +1047,11 @@ void HWDeviceDRM::SetSolidfillStages() { } } +void HWDeviceDRM::ClearSolidfillStages() { + solid_fills_.clear(); + SetSolidfillStages(); +} + DisplayError HWDeviceDRM::Validate(HWLayers *hw_layers) { DTRACE_SCOPED(); @@ -1184,6 +1189,7 @@ DisplayError HWDeviceDRM::AtomicCommit(HWLayers *hw_layers) { DisplayError HWDeviceDRM::Flush() { DTRACE_SCOPED(); + ClearSolidfillStages(); int ret = drm_atomic_intf_->Commit(false /* synchronous */, false /* retain_planes*/); if (ret) { DLOGE("failed with error %d", ret); diff --git a/sdm/libs/core/drm/hw_device_drm.h b/sdm/libs/core/drm/hw_device_drm.h index 63853c4a..c4f06c35 100644 --- a/sdm/libs/core/drm/hw_device_drm.h +++ b/sdm/libs/core/drm/hw_device_drm.h @@ -126,6 +126,7 @@ class HWDeviceDRM : public HWInterface { void UpdateMixerAttributes(); void SetSolidfillStages(); void AddSolidfillStage(const HWSolidfillStage &sf, uint32_t plane_alpha); + void ClearSolidfillStages(); void SetBlending(const LayerBlending &source, sde_drm::DRMBlendType *target); void SetSrcConfig(const LayerBuffer &input_buffer, const HWRotatorMode &mode, uint32_t *config); void SelectCscType(const LayerBuffer &input_buffer, sde_drm::DRMCscType *type); diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp index 867d805f..4d292632 100644 --- a/sdm/libs/hwc2/hwc_display.cpp +++ b/sdm/libs/hwc2/hwc_display.cpp @@ -1784,11 +1784,15 @@ int HWCDisplay::SetDisplayStatus(DisplayStatus display_status) { switch (display_status) { case kDisplayStatusResume: display_paused_ = false; + status = INT32(SetPowerMode(HWC2::PowerMode::On)); + break; case kDisplayStatusOnline: status = INT32(SetPowerMode(HWC2::PowerMode::On)); break; case kDisplayStatusPause: display_paused_ = true; + status = INT32(SetPowerMode(HWC2::PowerMode::Off)); + break; case kDisplayStatusOffline: status = INT32(SetPowerMode(HWC2::PowerMode::Off)); break; 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!!"); } |