sdm: Add support to query display port information.

1. Add binder and display interface to query display port information.
2. Add permission for audio client to use display services.

CRs-Fixed: 1044314
Change-Id: I67a9549cd6e01e421534dcb139a2e39672873775
diff --git a/libqdutils/display_config.cpp b/libqdutils/display_config.cpp
index 3415ac6..c1335b1 100644
--- a/libqdutils/display_config.cpp
+++ b/libqdutils/display_config.cpp
@@ -78,7 +78,7 @@
         dpyattr.yres = outParcel.readInt32();
         dpyattr.xdpi = outParcel.readFloat();
         dpyattr.ydpi = outParcel.readFloat();
-        dpyattr.panel_type = (char) outParcel.readInt32();
+        dpyattr.panel_type = outParcel.readInt32();
     } else {
         ALOGE("%s() failed with err %d", __FUNCTION__, err);
     }
@@ -237,7 +237,7 @@
 }
 
 DisplayAttributes getDisplayAttributes(int configIndex, int /*dpy*/) {
-    DisplayAttributes dpyattr;
+    DisplayAttributes dpyattr = {};
     sp<IQService> binder = getBinder();
     if(binder != NULL) {
         Parcel inParcel, outParcel;
@@ -252,7 +252,7 @@
             dpyattr.yres = outParcel.readInt32();
             dpyattr.xdpi = outParcel.readFloat();
             dpyattr.ydpi = outParcel.readFloat();
-            dpyattr.panel_type = (char) outParcel.readInt32();
+            dpyattr.panel_type = outParcel.readInt32();
             dpyattr.is_yuv = outParcel.readInt32();
             ALOGI("%s() Received attrs for index %d: xres %d, yres %d",
                     __FUNCTION__, configIndex, dpyattr.xres, dpyattr.yres);
diff --git a/libqdutils/display_config.h b/libqdutils/display_config.h
index 15aba94..6512bf5 100644
--- a/libqdutils/display_config.h
+++ b/libqdutils/display_config.h
@@ -76,18 +76,26 @@
     COMMAND_MODE,
 };
 
+enum {
+    DISPLAY_PORT_DEFAULT = 0,
+    DISPLAY_PORT_DSI,
+    DISPLAY_PORT_DTV,
+    DISPLAY_PORT_WRITEBACK,
+    DISPLAY_PORT_LVDS,
+    DISPLAY_PORT_EDP,
+    DISPLAY_PORT_DP,
+};
+
 // Display Attributes that are available to clients of this library
 // Not to be confused with a similar struct in hwc_utils (in the hwc namespace)
 typedef struct DisplayAttributes {
-    uint32_t vsync_period; //nanoseconds
-    uint32_t xres;
-    uint32_t yres;
-    float xdpi;
-    float ydpi;
-    char panel_type;
-    bool is_yuv;
-    DisplayAttributes() : vsync_period(0), xres(0), yres(0), xdpi(0.0f),
-            ydpi(0.0f), panel_type(0), is_yuv(false) {}
+    uint32_t vsync_period = 0; //nanoseconds
+    uint32_t xres = 0;
+    uint32_t yres = 0;
+    float xdpi = 0.0f;
+    float ydpi = 0.0f;
+    int panel_type = DISPLAY_PORT_DEFAULT;
+    bool is_yuv = false;
 } DisplayAttributes_t;
 
 //=============================================================================