overlay: Add support for pipe dumps.

Add support for pipe state dump useful in dumpsys.
Reduce debug log spam when mdp state changes.

Change-Id: Ie27ad00698085e2ffd6166ad2f7503fe16a571f8
diff --git a/liboverlay/pipes/overlayGenPipe.cpp b/liboverlay/pipes/overlayGenPipe.cpp
index 0b864df..486cfda 100644
--- a/liboverlay/pipes/overlayGenPipe.cpp
+++ b/liboverlay/pipes/overlayGenPipe.cpp
@@ -241,6 +241,13 @@
     ALOGE("== Dump Generic pipe end ==");
 }
 
+void GenericPipe::getDump(char *buf, size_t len) {
+    mCtrlData.ctrl.getDump(buf, len);
+    mCtrlData.data.getDump(buf, len);
+    if(mRotUsed && mRot)
+        mRot->getDump(buf, len);
+}
+
 bool GenericPipe::isClosed() const  {
     return (pipeState == CLOSED);
 }
diff --git a/liboverlay/pipes/overlayGenPipe.h b/liboverlay/pipes/overlayGenPipe.h
index 604529a..1d1be25 100644
--- a/liboverlay/pipes/overlayGenPipe.h
+++ b/liboverlay/pipes/overlayGenPipe.h
@@ -84,6 +84,10 @@
 
     /* dump the state of the object */
     void dump() const;
+
+    /* Return the dump in the specified buffer */
+    void getDump(char *buf, size_t len);
+
 private:
     /* set Closed pipe */
     bool setClosed();