Merge "sdm: Set connector mode on power off"
diff --git a/sdm/libs/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp
index 14d0064..e90a782 100644
--- a/sdm/libs/core/drm/hw_device_drm.cpp
+++ b/sdm/libs/core/drm/hw_device_drm.cpp
@@ -740,6 +740,8 @@
   }
 
   SetFullROI();
+  drmModeModeInfo current_mode = connector_info_.modes[current_mode_index_].mode;
+  drm_atomic_intf_->Perform(DRMOps::CRTC_SET_MODE, token_.crtc_id, &current_mode);
   drm_atomic_intf_->Perform(DRMOps::CONNECTOR_SET_POWER_MODE, token_.conn_id, DRMPowerMode::OFF);
   drm_atomic_intf_->Perform(DRMOps::CRTC_SET_ACTIVE, token_.crtc_id, 0);
   int ret = drm_atomic_intf_->Commit(true /* synchronous */, false /* retain_planes */);
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp
index d54d898..dd049de 100644
--- a/sdm/libs/hwc2/hwc_display.cpp
+++ b/sdm/libs/hwc2/hwc_display.cpp
@@ -1993,6 +1993,10 @@
 }
 
 int HWCDisplay::GetActiveDisplayConfig(uint32_t *config) {
+  if (config_pending_) {
+    *config = display_config_;
+    return 0;
+  }
   return display_intf_->GetActiveConfig(config) == kErrorNone ? 0 : -1;
 }