hwc2: Handle missing hotplug event [HDMI as primary].
- On boot if HDMI is connected, we are dropping
the hotplug event which leads to SF crash
CRs-Fixed: 2085392
Change-Id: I6a3025bc50db5a302079614c49bd850a3f71ce10
diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp
index 41a6b36..2039a46 100644
--- a/sdm/libs/hwc2/hwc_session.cpp
+++ b/sdm/libs/hwc2/hwc_session.cpp
@@ -518,7 +518,7 @@
auto error = hwc_session->callbacks_.Register(desc, callback_data, pointer);
DLOGD("Registering callback: %s", to_string(desc).c_str());
if (descriptor == HWC2_CALLBACK_HOTPLUG) {
- if (hwc_session->hwc_display_[HWC_DISPLAY_PRIMARY] && !hwc_session->hdmi_is_primary_) {
+ if (hwc_session->hwc_display_[HWC_DISPLAY_PRIMARY]) {
hwc_session->callbacks_.Hotplug(HWC_DISPLAY_PRIMARY, HWC2::Connection::Connected);
}
}