Camera: Cache and defer Surface binder IPC calls
Try to cache and defer Surface related IPC configuration
calls. Specifically:
1) Avoid retrieving the consumer name until dump
2) Cache and re-use the surface consumer usage value
3) Configure the producer max undequeued buffer count
instead of the total buffer count
Additionally, raise the stream configuration thread
prioirty during the binder IPC intensive stream/surface
setup.
Bug: 323292530
Test: Manual using camera application,
adb shell dumpsys media.camera
Change-Id: Ibf4149a2b1fb8e5a5e357fa6e2360c70a743413d
diff --git a/camera/camera_platform.aconfig b/camera/camera_platform.aconfig
index 1dc45c3..8e455c6 100644
--- a/camera/camera_platform.aconfig
+++ b/camera/camera_platform.aconfig
@@ -137,6 +137,16 @@
flag {
namespace: "camera_platform"
+ name: "surface_ipc"
+ description: "Optimize Surface binder IPC"
+ bug: "323292530"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
+ namespace: "camera_platform"
name: "extension_10_bit"
is_exported: true
description: "Enables 10-bit support in the camera extensions."
diff --git a/camera/cameraserver/cameraserver.rc b/camera/cameraserver/cameraserver.rc
index e307653..63fa2b0 100644
--- a/camera/cameraserver/cameraserver.rc
+++ b/camera/cameraserver/cameraserver.rc
@@ -5,5 +5,6 @@
ioprio rt 4
task_profiles CameraServiceCapacity MaxPerformance
rlimit rtprio 10 10
+ capabilities SYS_NICE
onrestart class_restart cameraWatchdog
interface aidl android.frameworks.cameraservice.service.ICameraService/default