diff options
Diffstat (limited to 'sdm/libs/core/drm/hw_device_drm.cpp')
-rw-r--r-- | sdm/libs/core/drm/hw_device_drm.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sdm/libs/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp index 1f5de169..aee7cae3 100644 --- a/sdm/libs/core/drm/hw_device_drm.cpp +++ b/sdm/libs/core/drm/hw_device_drm.cpp @@ -731,6 +731,7 @@ DisplayError HWDeviceDRM::SetDisplayAttributes(uint32_t index) { current_mode_index_ = index; PopulateHWPanelInfo(); UpdateMixerAttributes(); + update_mode_ = true; DLOGI("Display attributes[%d]: WxH: %dx%d, DPI: %fx%f, FPS: %d, LM_SPLIT: %d, V_BACK_PORCH: %d," \ " V_FRONT_PORCH: %d, V_PULSE_WIDTH: %d, V_TOTAL: %d, H_TOTAL: %d, CLK: %dKHZ, TOPOLOGY: %d", @@ -764,6 +765,7 @@ DisplayError HWDeviceDRM::PowerOn(int *release_fence) { return kErrorNone; } + update_mode_ = true; drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ACTIVE, token_.crtc_id, 1); drm_atomic_intf_->Perform(DRMOps::CONNECTOR_SET_POWER_MODE, token_.conn_id, DRMPowerMode::ON); int ret = drm_atomic_intf_->Commit(true /* synchronous */, true /* retain_planes */); @@ -1002,7 +1004,11 @@ void HWDeviceDRM::SetupAtomic(HWLayers *hw_layers, bool validate) { drm_atomic_intf_->Perform(DRMOps::CONNECTOR_SET_POWER_MODE, token_.conn_id, DRMPowerMode::ON); } - drm_atomic_intf_->Perform(DRMOps::CRTC_SET_MODE, token_.crtc_id, ¤t_mode); + // Set CRTC mode, only if display config changes + if (vrefresh_ || first_cycle_ || update_mode_) { + drm_atomic_intf_->Perform(DRMOps::CRTC_SET_MODE, token_.crtc_id, ¤t_mode); + } + drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ACTIVE, token_.crtc_id, 1); if (!validate && (hw_layer_info.set_idle_time_ms >= 0)) { @@ -1181,6 +1187,7 @@ DisplayError HWDeviceDRM::AtomicCommit(HWLayers *hw_layers) { } first_cycle_ = false; + update_mode_ = false; return kErrorNone; } |