display: Dynamic debug logging via binder
Provides a way to enable/disable logs at runtime via binder.
The logs need to be enabled from a priviliged shell.
For example,
$ adb shell service call display.qservice 15 i32 0 i32 1
Here 15 is the integer code for DYNAMIC_DEBUG in IQService.h
The first parameter 0 is for DEBUG_ALL
The second parameter 1 is to enable.
Hence, this command enables all debug logs.
Another example - this command enables vsync logging
$ adb shell service call display.qservice 15 i32 2 i32 1
Change-Id: I13d5f397d9d03f0ac6a14d3a3c9098ed59fc62fd
diff --git a/libqservice/IQService.h b/libqservice/IQService.h
index 5c9acf7..c222eb9 100644
--- a/libqservice/IQService.h
+++ b/libqservice/IQService.h
@@ -52,6 +52,7 @@
PAUSE_WFD, // Pause/Resume WFD
SET_WFD_STATUS, // Set if wfd connection is on/off
SET_VIEW_FRAME, // Set view frame of display
+ DYNAMIC_DEBUG, // Enable more logging on the fly
COMMAND_LIST_END = 400,
};
@@ -60,6 +61,12 @@
START,
};
+ enum {
+ DEBUG_ALL,
+ DEBUG_MDPCOMP,
+ DEBUG_VSYNC,
+ };
+
// Register a client that can be notified
virtual void connect(const android::sp<qClient::IQClient>& client) = 0;
// Generic function to dispatch binder commands