mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 20:24:19 +00:00
Merge "graphics: use FIFO scheduler in IComposer"
This commit is contained in:
committed by
Android (Google) Code Review
commit
a9e8d15a46
@@ -2,4 +2,5 @@ service hwcomposer-2-1 /system/bin/hw/android.hardware.graphics.composer@2.1-ser
|
||||
class hal
|
||||
user system
|
||||
group graphics drmrpc readproc
|
||||
capabilities SYS_NICE
|
||||
onrestart restart surfaceflinger
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
#define LOG_TAG "android.hardware.graphics.composer@2.1-service"
|
||||
|
||||
#include <sched.h>
|
||||
|
||||
#include <android/hardware/graphics/composer/2.1/IComposer.h>
|
||||
|
||||
#include <binder/ProcessState.h>
|
||||
@@ -29,5 +31,13 @@ int main() {
|
||||
android::ProcessState::self()->setThreadPoolMaxThreadCount(4);
|
||||
android::ProcessState::self()->startThreadPool();
|
||||
|
||||
// same as SF main thread
|
||||
struct sched_param param = {0};
|
||||
param.sched_priority = 2;
|
||||
if (sched_setscheduler(0, SCHED_FIFO | SCHED_RESET_ON_FORK,
|
||||
¶m) != 0) {
|
||||
ALOGE("Couldn't set SCHED_FIFO: %d", errno);
|
||||
}
|
||||
|
||||
return defaultPassthroughServiceImplementation<IComposer>("hwcomposer");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user