Snap for 6824415 from 72ac3262070aa9511ab93103b04ec7029661339e to rvc-d2-release
Change-Id: I2d7a51b51ff87167d20b00fc69c9c125d43c92d6
diff --git a/gralloc/service.cpp b/gralloc/service.cpp
index 7ea1e3a..1ef8fec 100644
--- a/gralloc/service.cpp
+++ b/gralloc/service.cpp
@@ -31,12 +31,16 @@
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
+using android::hardware::setMinSchedulerPolicy;
using vendor::qti::hardware::display::allocator::V3_0::IQtiAllocator;
using vendor::qti::hardware::display::allocator::V3_0::implementation::QtiAllocator;
int main(int, char **) {
android::sp<IQtiAllocator> service = new QtiAllocator();
configureRpcThreadpool(4, true /*callerWillJoin*/);
+ if (!setMinSchedulerPolicy(service, SCHED_NORMAL, -20)) {
+ ALOGW("Cannot bump allocator priority");
+ }
if (service->registerAsService() != android::OK) {
ALOGE("Cannot register QTI Allocator service");
return -EINVAL;