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/libhwcomposer/hwc_mdpcomp.h b/libhwcomposer/hwc_mdpcomp.h
index 713020a..1ebe0bd 100644
--- a/libhwcomposer/hwc_mdpcomp.h
+++ b/libhwcomposer/hwc_mdpcomp.h
@@ -56,6 +56,7 @@
static bool init(hwc_context_t *ctx);
static void resetIdleFallBack() { sIdleFallBack = false; }
static bool isIdleFallback() { return sIdleFallBack; }
+ static void dynamicDebug(bool enable){ sDebugLogs = enable; }
protected:
enum { MAX_SEC_LAYERS = 1 }; //TODO add property support