diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-12-10 23:09:21 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-12-10 23:09:21 +0000 |
commit | c1d33dff1200cad6de736645b59896238c1d114b (patch) | |
tree | 7470feae96fc180772b804e3d07c0544564b4112 | |
parent | 616dd0bf5250251ca47d7a703a2005f955d3d7c5 (diff) | |
parent | 9116539540d9f8f3975b0df2f2c6751e63a79050 (diff) | |
download | android_hardware_qcom_sdm710_display-c1d33dff1200cad6de736645b59896238c1d114b.tar.gz android_hardware_qcom_sdm710_display-c1d33dff1200cad6de736645b59896238c1d114b.tar.bz2 android_hardware_qcom_sdm710_display-c1d33dff1200cad6de736645b59896238c1d114b.zip |
Snap for 5173751 from 9116539540d9f8f3975b0df2f2c6751e63a79050 to pi-b4s4-release
Change-Id: I5307e48d82610002df1d7822f6c62ec44b15a65f
-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!!"); } |