summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Mahaveer <vishalm@ti.com>2018-02-27 16:06:18 -0600
committerVishal Mahaveer <vishalm@ti.com>2018-02-27 16:08:03 -0600
commit86fef9cbae90ea05f7551e407cc0bcbb17f767a1 (patch)
tree7cea26c05f59c3ea62250c9e5ea40c32017a2581
parent4960a2dec45964011a59ca492e7fd52723713f52 (diff)
downloaddra7xx-86fef9cbae90ea05f7551e407cc0bcbb17f767a1.tar.gz
hwc: Handle HDMI hotplug disconnect correctly
This change propagates correct state information on HDMI hotplug disconnect event. Change-Id: I4791fa7f4f61328a4831e416763f648a577dbc3c Signed-off-by: Vishal Mahaveer <vishalm@ti.com> Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
-rw-r--r--hwcomposer/hwc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hwcomposer/hwc.c b/hwcomposer/hwc.c
index a7f0200..9b7ebd6 100644
--- a/hwcomposer/hwc.c
+++ b/hwcomposer/hwc.c
@@ -485,7 +485,6 @@ static void handle_hotplug(omap_hwc_device_t *hwc_dev)
}
bool state = hwc_dev->ext_disp_state;
- bool hotplug = false;
pthread_mutex_lock(&hwc_dev->ctx_mutex);
@@ -497,7 +496,6 @@ static void handle_hotplug(omap_hwc_device_t *hwc_dev)
pthread_mutex_unlock(&hwc_dev->ctx_mutex);
return;
}
- hotplug = true;
} else
remove_external_hdmi_display(hwc_dev);
@@ -513,7 +511,7 @@ static void handle_hotplug(omap_hwc_device_t *hwc_dev)
* still a race condition where a hotplug event might occur after the open
* but before the procs are registered. */
if (hwc_dev->cb_procs) {
- if (hotplug && hwc_dev->cb_procs->hotplug) {
+ if (hwc_dev->cb_procs->hotplug) {
hwc_dev->cb_procs->hotplug(hwc_dev->cb_procs, HWC_DISPLAY_EXTERNAL, state);
} else {
if (hwc_dev->cb_procs->invalidate)