From: Erik Wolsheimer Date: Wed, 28 Mar 2018 23:27:54 +0000 (-0700) Subject: Make hwc_vsync thread realtime X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=748becfcb0cd284085f4cbedcdff30fe8332a5b3;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos.git Make hwc_vsync thread realtime Bug: 68395248 Change-Id: I4ac93464aa2ccf416577b4067ed658b525089983 --- diff --git a/libhwc/ExynosHWC.cpp b/libhwc/ExynosHWC.cpp index c6f1e50..02913a4 100644 --- a/libhwc/ExynosHWC.cpp +++ b/libhwc/ExynosHWC.cpp @@ -626,7 +626,11 @@ void *hwc_vsync_thread(void *data) char uevent_desc[4096]; memset(uevent_desc, 0, sizeof(uevent_desc)); - setpriority(PRIO_PROCESS, 0, HAL_PRIORITY_URGENT_DISPLAY); + struct sched_param sched_param = {0}; + sched_param.sched_priority = 5; + if (sched_setscheduler(gettid(), SCHED_FIFO, &sched_param) != 0) { + ALOGE("Couldn't set SCHED_FIFO for hwc_vsync"); + } uevent_init();