overlay: Add pipe life-cycle logging
Add pipe life-cycle logging including set, unset, commit.
Remove the older unused logging mechanism.
This is enabled via binder as:
$adb shell service call display.qservice 15 i32 4 i32 1
where 15 is DYNAMIC_DEBUG, 4 is for pipe lifecycle debugging and
1 is to enable
Change-Id: I6c02e24aa91135d4a6c67870b4c103546947da48
diff --git a/liboverlay/overlay.h b/liboverlay/overlay.h
index 4f5d56d..e8369ca 100644
--- a/liboverlay/overlay.h
+++ b/liboverlay/overlay.h
@@ -152,6 +152,10 @@
* Single interface panels will only update left ROI. */
static bool displayCommit(const int& fd, const utils::Dim& lRoi,
const utils::Dim& rRoi);
+ /* Logs pipe lifecycle events like set, unset, commit when enabled */
+ static void debugPipeLifecycle(const bool& enable);
+ /* Returns true if pipe life cycle logging is enabled */
+ static bool isDebugPipeLifecycle();
private:
/* Ctor setup */
@@ -159,7 +163,6 @@
/*Validate index range, abort if invalid */
void validate(int index);
static void setDMAMultiplexingSupported();
- void dump() const;
/* Returns an available pipe based on the type of pipe requested. When ANY
* is requested, the first available VG or RGB is returned. If no pipe is
* available for the display "dpy" then INV is returned. Note: If a pipe is
@@ -239,9 +242,6 @@
PipeBook mPipeBook[utils::OV_INVALID]; //Used as max
- /* Dump string */
- char mDumpStr[1024];
-
/* Singleton Instance*/
static Overlay *sInstance;
static int sDpyFbMap[DPY_MAX];
@@ -249,6 +249,7 @@
static bool sDMAMultiplexingSupported;
static void *sLibScaleHandle;
static int (*sFnProgramScale)(struct mdp_overlay_list *);
+ static bool sDebugPipeLifecycle;
friend class MdpCtrl;
};
@@ -342,6 +343,14 @@
return sFnProgramScale;
}
+inline void Overlay::debugPipeLifecycle(const bool& enable) {
+ sDebugPipeLifecycle = enable;
+}
+
+inline bool Overlay::isDebugPipeLifecycle() {
+ return sDebugPipeLifecycle;
+}
+
inline bool Overlay::PipeBook::valid() {
return (mPipe != NULL);
}