summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2012-12-16 11:06:53 +0100
committercodeworkx <codeworkx@cyanogenmod.org>2012-12-16 12:10:36 +0100
commit62b870e5be867f00f841a74af85f0845902aa29b (patch)
tree897f0ba4d72a0258bdb5b06b60a8ef7e5721890f
parent53cacd86d64639e7f0d722c49b45caacf96b8594 (diff)
downloadhardware_ti_omap4xxx-62b870e5be867f00f841a74af85f0845902aa29b.zip
hardware_ti_omap4xxx-62b870e5be867f00f841a74af85f0845902aa29b.tar.gz
hardware_ti_omap4xxx-62b870e5be867f00f841a74af85f0845902aa29b.tar.bz2
hwc: fix timing issue with vsync sysfs loop
Change-Id: I6e0307e0fd5ea84748ddb580062b21f697512603
-rw-r--r--hwc/hwc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/hwc/hwc.c b/hwc/hwc.c
index 81dff84..ae0de40 100644
--- a/hwc/hwc.c
+++ b/hwc/hwc.c
@@ -1857,7 +1857,7 @@ static void *omap4_hwc_vsync_sysfs_loop(void *data)
vsync_timestamp_fd = open("/sys/devices/platform/omapfb/vsync_time", O_RDONLY);
char thread_name[64] = "hwcVsyncThread";
prctl(PR_SET_NAME, (unsigned long) &thread_name, 0, 0, 0);
- setpriority(PRIO_PROCESS, 0, -20);
+ setpriority(PRIO_PROCESS, 0, HAL_PRIORITY_URGENT_DISPLAY);
memset(buf, 0, sizeof(buf));
ALOGD("Using sysfs mechanism for VSYNC notification");
@@ -2108,15 +2108,6 @@ static int omap4_hwc_device_open(const hw_module_t* module, const char* name,
goto done;
}
-#ifdef SYSFS_VSYNC_NOTIFICATION
- if (pthread_create(&hwc_dev->vsync_thread, NULL, omap4_hwc_vsync_sysfs_loop, hwc_dev))
- {
- ALOGE("pthread_create() failed : %s", errno);
- err = -errno;
- goto done;
- }
-#endif
-
if (pthread_create(&hwc_dev->hdmi_thread, NULL, omap4_hwc_hdmi_thread, hwc_dev))
{
ALOGE("failed to create HDMI listening thread (%d): %m", errno);
@@ -2167,6 +2158,15 @@ static int omap4_hwc_device_open(const hw_module_t* module, const char* name,
}
handle_hotplug(hwc_dev);
+#ifdef SYSFS_VSYNC_NOTIFICATION
+ if (pthread_create(&hwc_dev->vsync_thread, NULL, omap4_hwc_vsync_sysfs_loop, hwc_dev))
+ {
+ ALOGE("pthread_create() failed (%d): %m", errno);
+ err = -errno;
+ goto done;
+ }
+#endif
+
ALOGI("omap4_hwc_device_open(rgb_order=%d nv12_only=%d)",
hwc_dev->flags_rgb_order, hwc_dev->flags_nv12_only);