summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Mahaveer <vishalm@ti.com>2018-06-06 15:34:17 -0500
committerVishal Mahaveer <vishalm@ti.com>2018-07-11 09:56:49 -0600
commit27f4a6409db891962939b82e211efcce059aeae4 (patch)
tree612b9d553a96b546527cb88e86c3c9cd3c4e2c5b
parent81fe65535831e6cea962be0e555274226786f915 (diff)
downloaddra7xx-27f4a6409db891962939b82e211efcce059aeae4.tar.gz
hwc: move uevent dependant code under new flag
HDMI hotplug detection logic is dependent on uevent APIs, move this code under new flag to remove dependency on libhardware_legacy. When building for VNDK, set the HWC_SUPPORT_HDMI_HOTPLUG flag to false. Change-Id: Iacb932124dbb81f3af42760a5fe886efc0443448 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
-rw-r--r--hwcomposer/Android.mk8
-rw-r--r--hwcomposer/hwc.c6
2 files changed, 13 insertions, 1 deletions
diff --git a/hwcomposer/Android.mk b/hwcomposer/Android.mk
index 2221c43..f4b279e 100644
--- a/hwcomposer/Android.mk
+++ b/hwcomposer/Android.mk
@@ -8,7 +8,7 @@ LOCAL_PRELINK_MODULE := false
LOCAL_ARM_MODE := arm
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_VENDOR_MODULE := true
-LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libhardware libdrm libsync libhardware_legacy libdrm_omap
+LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libhardware libdrm libsync libdrm_omap
LOCAL_CFLAGS += -DSUPPORT_ANDROID_MEMTRACK_HAL
@@ -36,6 +36,12 @@ ifeq ($(HWC_USE_DRM_PAGEFLIP_MODE),true)
LOCAL_CFLAGS += -DHWC_USE_DRM_PAGEFLIP_MODE
endif
+HWC_SUPPORT_HDMI_HOTPLUG := true
+ifeq ($(HWC_SUPPORT_HDMI_HOTPLUG),true)
+ LOCAL_CFLAGS += -DHWC_SUPPORT_HDMI_HOTPLUG
+ LOCAL_SHARED_LIBRARIES += libhardware_legacy
+endif
+
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := hwcomposer.$(TARGET_BOARD_PLATFORM)
diff --git a/hwcomposer/hwc.c b/hwcomposer/hwc.c
index f03d43b..cab0d1a 100644
--- a/hwcomposer/hwc.c
+++ b/hwcomposer/hwc.c
@@ -31,7 +31,9 @@
#define HWC_REMOVE_DEPRECATED_VERSIONS 1
#include <hardware/hardware.h>
#include <hardware/hwcomposer.h>
+#ifdef HWC_SUPPORT_HDMI_HOTPLUG
#include <hardware_legacy/uevent.h>
+#endif
#include <system/graphics.h>
#include <utils/Timers.h>
#include <EGL/egl.h>
@@ -483,6 +485,7 @@ static int hwc_device_close(hw_device_t* device)
}
+#ifdef HWC_SUPPORT_HDMI_HOTPLUG
static void handle_hotplug(omap_hwc_device_t *hwc_dev)
{
/* WA: till Hotplug is integrated */
@@ -661,6 +664,7 @@ static void *hwc_hdmi_thread(void *data)
return NULL;
}
+#endif
/*
* DRM event polling thread
@@ -860,12 +864,14 @@ static int hwc_device_open(const hw_module_t* module, const char* name, hw_devic
goto done;
}
+#ifdef HWC_SUPPORT_HDMI_HOTPLUG
if (pthread_create(&hwc_dev->hdmi_thread, NULL, hwc_hdmi_thread, hwc_dev))
{
ALOGE("failed to create HDMI listening thread (%d): %m", errno);
err = -errno;
goto done;
}
+#endif
char value[PROPERTY_VALUE_MAX];
property_get("persist.hwc.upscaled_nv12_limit", value, "2.");