Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4c39654 authored by Pawin Vongmasa's avatar Pawin Vongmasa
Browse files

mediaserver: add more hwbinder threads

Since we're now using HIDL IGraphicBufferSource in CCodec, the
existence of a callstack with mixed binder and hwbinder calls can cause
a stall when all threads are in use. (b/35283480) The recommended
workaround was to increase the number of threads. This CL does that.

Test: atest CtsMediaTestCases
Test: atest CtsCameraTestCases

Bug: 153828976
Change-Id: I37f02b6237ad032e311a8219b209713d2e4463a6
parent ae87d21c
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -15,13 +15,14 @@ cc_binary {
    srcs: ["main_mediaserver.cpp"],

    shared_libs: [
        "libresourcemanagerservice",
        "android.hardware.media.omx@1.0",
        "libandroidicu",
        "libbinder",
        "libhidlbase",
        "liblog",
        "libmediaplayerservice",
        "libresourcemanagerservice",
        "libutils",
        "libbinder",
        "libandroidicu",
        "android.hardware.media.omx@1.0",
    ],

    static_libs: [
+3 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
#include <hidl/HidlTransportSupport.h>
#include <utils/Log.h>
#include "RegisterExtensions.h"

@@ -42,6 +43,8 @@ int main(int argc __unused, char **argv __unused)
    MediaPlayerService::instantiate();
    ResourceManagerService::instantiate();
    registerExtensions();
    ::android::hardware::configureRpcThreadpool(16, false);
    ProcessState::self()->startThreadPool();
    IPCThreadState::self()->joinThreadPool();
    ::android::hardware::joinRpcThreadpool();
}