summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun Arora <varuaror@codeaurora.org>2018-09-26 14:00:56 -0700
committerVarun Arora <varuaror@codeaurora.org>2018-09-26 14:00:56 -0700
commitd366c20dbc57f11ed483919c27d12e86c1a2da32 (patch)
tree4568f856fe2f82dc2d5f5f7d9b07abad6a2b3eb0
parentb4e5cc1a5e0347b51a6376ac4e3e08de58a2b4aa (diff)
hwc2: Minor enhancements to pluggable code readability
Change-Id: I9c331fc05a7a6fd54bb32e88474375a5a7d98f4f CRs-Fixed: 2323363
-rw-r--r--sdm/libs/hwc2/hwc_session.cpp9
-rw-r--r--sdm/libs/hwc2/hwc_session.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp
index 2f75b373..57bf6a35 100644
--- a/sdm/libs/hwc2/hwc_session.cpp
+++ b/sdm/libs/hwc2/hwc_session.cpp
@@ -669,7 +669,7 @@ int32_t HWCSession::PresentDisplay(hwc2_device_t *device, hwc2_display_t display
if (!hwc_session->primary_ready_ && (display == HWC_DISPLAY_PRIMARY)) {
hwc_session->primary_ready_ = true;
hwc_session->CreateBuiltInDisplays();
- hwc_session->CreatePluggableDisplays(false);
+ hwc_session->HandlePluggableDisplays(false);
}
return INT32(status);
@@ -1915,8 +1915,9 @@ void HWCSession::UEventHandler(const char *uevent_data, int length) {
hpd_bpp_ = GetEventValue(uevent_data, length, "bpp=");
hpd_pattern_ = GetEventValue(uevent_data, length, "pattern=");
- DLOGI("Uevent = %s, bpp = %d, pattern = %d", uevent_data, hpd_bpp_, hpd_pattern_);
- if (CreatePluggableDisplays(true)) {
+ DLOGI("Uevent = %s, status = %s, MST_HOTPLUG = %s, bpp = %d, pattern = %d", uevent_data,
+ str_status ? str_status : "NULL", str_mst ? str_mst : "NULL", hpd_bpp_, hpd_pattern_);
+ if (HandlePluggableDisplays(true)) {
DLOGE("Could not handle hotplug. Event dropped.");
}
@@ -2122,7 +2123,7 @@ int HWCSession::CreateBuiltInDisplays() {
return status;
}
-int HWCSession::CreatePluggableDisplays(bool delay_hotplug) {
+int HWCSession::HandlePluggableDisplays(bool delay_hotplug) {
if (!primary_ready_) {
DLOGI("Primary display is not ready. Connect displays later if any.");
return 0;
diff --git a/sdm/libs/hwc2/hwc_session.h b/sdm/libs/hwc2/hwc_session.h
index ce4c265b..93ee708f 100644
--- a/sdm/libs/hwc2/hwc_session.h
+++ b/sdm/libs/hwc2/hwc_session.h
@@ -242,7 +242,7 @@ class HWCSession : hwc2_device_t, HWCUEventListener, IDisplayConfig, public qCli
int GetDisplayIndex(int dpy);
int CreatePrimaryDisplay();
int CreateBuiltInDisplays();
- int CreatePluggableDisplays(bool delay_hotplug);
+ int HandlePluggableDisplays(bool delay_hotplug);
int HandleConnectedDisplays(HWDisplaysInfo *hw_displays_info, bool delay_hotplug);
int HandleDisconnectedDisplays(HWDisplaysInfo *hw_displays_info);
void DestroyDisplay(DisplayMapInfo *map_info);