hwc: vd: Dynamic dumping of frames for virtual displays

Provides a way to enable/disable dumping of virtual display
frames at runtime via binder. The dumping needs to be enabled
from a priviliged shell.

For example,
$ adb shell service call display.qservice 15 i32 3 i32 1

Here 15 is the integer code for DYNAMIC_DEBUG in IQService.h
The first parameter 3 is for DEBUG_VD
The second parameter 1 is to enable.

Change-Id: Idd62c5d9ffa6e4eb7dec585984d145bc6a421336
diff --git a/libhwcomposer/hwc_qclient.cpp b/libhwcomposer/hwc_qclient.cpp
index 892e9c0..efe6e16 100644
--- a/libhwcomposer/hwc_qclient.cpp
+++ b/libhwcomposer/hwc_qclient.cpp
@@ -32,6 +32,7 @@
 #include <hwc_utils.h>
 #include <mdp_version.h>
 #include <hwc_mdpcomp.h>
+#include <hwc_virtual.h>
 
 #define QCLIENT_DEBUG 0
 
@@ -231,6 +232,10 @@
             ctx->vstate.debug = enable;
             if (debug_type != IQService::DEBUG_ALL)
                 break;
+        case IQService::DEBUG_VD:
+            HWCVirtualBase::dynamicDebug(enable);
+            if (debug_type != IQService::DEBUG_ALL)
+                break;
     }
 }