diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp index af23ecb..c6f4faf 100644 --- a/libhwcomposer/hwc.cpp +++ b/libhwcomposer/hwc.cpp @@ -70,6 +70,9 @@ static void hwc_registerProcs(struct hwc_composer_device* dev, return; } ctx->device.reserved_proc[0] = (void*)procs; + + // Now that we have the functions needed, kick off the uevent thread + init_uevent_thread(ctx); } static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) diff --git a/libhwcomposer/hwc_uevents.cpp b/libhwcomposer/hwc_uevents.cpp index 68d01ae..dc94eac 100644 --- a/libhwcomposer/hwc_uevents.cpp +++ b/libhwcomposer/hwc_uevents.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include "hwc_utils.h" @@ -88,6 +89,8 @@ static void *uevent_loop(void *param) memset(udata, 0, sizeof(udata)); hwc_context_t * ctx = reinterpret_cast(param); + char thread_name[64] = "hwcUeventThread"; + prctl(PR_SET_NAME, (unsigned long) &thread_name, 0, 0, 0); setpriority(PRIO_PROCESS, 0, HAL_PRIORITY_URGENT_DISPLAY); uevent_init(); @@ -102,6 +105,7 @@ static void *uevent_loop(void *param) void init_uevent_thread(hwc_context_t* ctx) { pthread_t uevent_thread; + ALOGI("Initializing UEvent Listener Thread"); pthread_create(&uevent_thread, NULL, uevent_loop, (void*) ctx); } diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp index 258913d..155447a 100644 --- a/libhwcomposer/hwc_utils.cpp +++ b/libhwcomposer/hwc_utils.cpp @@ -54,8 +54,6 @@ void initContext(hwc_context_t *ctx) ctx->mExtDisplay = new ExternalDisplay(ctx); MDPComp::init(ctx); - init_uevent_thread(ctx); - char value[PROPERTY_VALUE_MAX]; property_get("debug.egl.swapinterval", value, "1"); ctx->swapInterval = atoi(value);