overlay: writeback: Add dumpsys info

Add dumpsys information from writeback data structure.
Remove some unused fields, formatting to save space.

b/8316155 - Implement HWComposer 1.3 w/ virtual display support
Change-Id: I808ce67aae16e27c3aa6d6db45983929b1386b69
diff --git a/msm8974/libhwcomposer/hwc.cpp b/msm8974/libhwcomposer/hwc.cpp
index 8e0afe0..dc1f931 100644
--- a/msm8974/libhwcomposer/hwc.cpp
+++ b/msm8974/libhwcomposer/hwc.cpp
@@ -675,6 +675,9 @@
     ovDump[0] = '\0';
     ctx->mRotMgr->getDump(ovDump, 1024);
     dumpsys_log(aBuf, ovDump);
+    ovDump[0] = '\0';
+    Writeback::getInstance()->getDump(ovDump, 1024);
+    dumpsys_log(aBuf, ovDump);
     strlcpy(buff, aBuf.string(), buff_len);
 }
 
diff --git a/msm8974/liboverlay/overlayRotator.cpp b/msm8974/liboverlay/overlayRotator.cpp
index 84a9818..7b3dda1 100644
--- a/msm8974/liboverlay/overlayRotator.cpp
+++ b/msm8974/liboverlay/overlayRotator.cpp
@@ -168,8 +168,8 @@
             mRot[i]->getDump(buf, len);
         }
     }
-    char str[32] = {'\0'};
-    snprintf(str, 32, "\n================\n");
+    char str[4] = {'\0'};
+    snprintf(str, 4, "\n");
     strncat(buf, str, strlen(str));
 }
 
diff --git a/msm8974/liboverlay/overlayUtils.cpp b/msm8974/liboverlay/overlayUtils.cpp
index 9c6e6c7..c7b0817 100644
--- a/msm8974/liboverlay/overlayUtils.cpp
+++ b/msm8974/liboverlay/overlayUtils.cpp
@@ -423,9 +423,8 @@
         const msmfb_data& ov) {
     char str_data[256] = {'\0'};
     snprintf(str_data, 256,
-            "%s offset=%d memid=%d id=%d flags=0x%x priv=%d\n",
-            prefix, ov.offset, ov.memory_id, ov.id, ov.flags,
-            ov.priv);
+            "%s offset=%d memid=%d id=%d flags=0x%x\n",
+            prefix, ov.offset, ov.memory_id, ov.id, ov.flags);
     strncat(buf, str_data, strlen(str_data));
 }
 
diff --git a/msm8974/liboverlay/overlayWriteback.cpp b/msm8974/liboverlay/overlayWriteback.cpp
index 23517e2..7d2ede8 100644
--- a/msm8974/liboverlay/overlayWriteback.cpp
+++ b/msm8974/liboverlay/overlayWriteback.cpp
@@ -213,6 +213,13 @@
     return mOpFmt;
 }
 
+void Writeback::getDump(char *buf, size_t len) const {
+    utils::getDump(buf, len, "WBData", mFbData);
+    char str[4] = {'\0'};
+    snprintf(str, 4, "\n");
+    strncat(buf, str, strlen(str));
+}
+
 //static
 
 Writeback *Writeback::getInstance() {
diff --git a/msm8974/liboverlay/overlayWriteback.h b/msm8974/liboverlay/overlayWriteback.h
index 8c0c52a..33eb059 100644
--- a/msm8974/liboverlay/overlayWriteback.h
+++ b/msm8974/liboverlay/overlayWriteback.h
@@ -87,6 +87,7 @@
     int getFbFd() const { return mFd.getFD(); }
     int getOutputFormat();
     bool setOutputFormat(int mdpFormat);
+    void getDump(char *buf, size_t len) const;
 
     static Writeback* getInstance();
     static void configBegin() { sUsed = false; }