From ec71f00148458a2f9172c5a53f56594ee86db4fb Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 11 May 2017 15:20:10 -0700 Subject: [PATCH] graphics: set maxThreads to 4 for the composer There are implmentations that can dead lock when calling certain functions in certain states. It works fine before HIDL because SurfaceFlinger calls those functions in another thread. We allow for 4 hwbinder threads in this commit to simulate how SurfaceFlinger calls hwcomposer. Bug: 38183197 Test: camera, videos, multi windows, screencap, screenrecord Change-Id: Ie05b2ca349b8c1ed9a3ac962981434f2efee92d9 --- graphics/composer/2.1/default/service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/composer/2.1/default/service.cpp b/graphics/composer/2.1/default/service.cpp index aa0604a5a2..82a33f6a4e 100644 --- a/graphics/composer/2.1/default/service.cpp +++ b/graphics/composer/2.1/default/service.cpp @@ -40,5 +40,5 @@ int main() { ALOGE("Couldn't set SCHED_FIFO: %d", errno); } - return defaultPassthroughServiceImplementation(); + return defaultPassthroughServiceImplementation(4); }