diff options
author | feifanz <feifanz@codeaurora.org> | 2016-06-08 13:15:03 +0800 |
---|---|---|
committer | feifanz <feifanz@codeaurora.org> | 2016-06-28 17:38:42 +0800 |
commit | 52773656de7a11de050c2bf514b7b0811b384d5a (patch) | |
tree | 9c2d71e52e1cf16eee22c25371e7c35dfcf7393c | |
parent | 3d5d4c184d1f5531ea650093a239a652143bbd3a (diff) | |
download | hardware_qcom_display-52773656de7a11de050c2bf514b7b0811b384d5a.tar.gz hardware_qcom_display-52773656de7a11de050c2bf514b7b0811b384d5a.tar.bz2 hardware_qcom_display-52773656de7a11de050c2bf514b7b0811b384d5a.zip |
sdm: Power on HDMI panel when pluged in
Power on the device and refresh the screen on HDMI as primary connect.
Change-Id: Ib5c91ce5d4d8ff7cd5c57080e9084502d2d25599
CRs-fixed: 1020517
-rw-r--r-- | sdm/libs/hwc/hwc_session.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sdm/libs/hwc/hwc_session.cpp b/sdm/libs/hwc/hwc_session.cpp index 55b41305b..77b9affee 100644 --- a/sdm/libs/hwc/hwc_session.cpp +++ b/sdm/libs/hwc/hwc_session.cpp @@ -1354,6 +1354,7 @@ void HWCSession::ResetPanel() { int HWCSession::HotPlugHandler(bool connected) { int status = 0; bool notify_hotplug = false; + bool refresh_screen = false; // To prevent sending events to client while a lock is held, acquire scope locks only within // below scope so that those get automatically unlocked after the scope ends. @@ -1397,6 +1398,12 @@ int HWCSession::HotPlugHandler(bool connected) { return -1; } + DLOGI("Powering on primary"); + status = hwc_display_[HWC_DISPLAY_PRIMARY]->SetPowerMode(HWC_POWER_MODE_NORMAL); + if (status) { + DLOGE("power-on on primary failed with error = %d", status); + } + is_hdmi_yuv_ = IsDisplayYUV(HWC_DISPLAY_PRIMARY); // Next, go ahead and enable vsync on external display. This is expliclity required @@ -1409,6 +1416,7 @@ int HWCSession::HotPlugHandler(bool connected) { } // Don't do hotplug notification for HDMI as primary case for now notify_hotplug = false; + refresh_screen = true; } else { if (hwc_display_[HWC_DISPLAY_EXTERNAL]) { DLOGE("HDMI is already connected"); @@ -1467,7 +1475,7 @@ int HWCSession::HotPlugHandler(bool connected) { } } - if (connected && notify_hotplug) { + if (connected && (notify_hotplug || refresh_screen)) { // trigger screen refresh to ensure sufficient resources are available to process new // new display connection. hwc_procs_->invalidate(hwc_procs_); |