hwc: Fix dpi values reported

HWC 1.1 expects DPI multiplied by 1000

Bug 7241591

Change-Id: I680da8769f53f8a18d942a3b292d96a16885ebfa
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 202e40d..8514d32 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -336,10 +336,10 @@
             ALOGD("%s height = %d",__FUNCTION__, ctx->dpyAttr[disp].yres);
             break;
         case HWC_DISPLAY_DPI_X:
-            values[i] = ctx->dpyAttr[disp].xdpi;
+            values[i] = (int32_t) (ctx->dpyAttr[disp].xdpi*1000.0);
             break;
         case HWC_DISPLAY_DPI_Y:
-            values[i] = ctx->dpyAttr[disp].ydpi;
+            values[i] = (int32_t) (ctx->dpyAttr[disp].ydpi*1000.0);
             break;
         default:
             ALOGE("Unknown display attribute %d",
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 1b1d4d6..db79e7d 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -56,8 +56,8 @@
     uint32_t vsync_period; //nanos
     uint32_t xres;
     uint32_t yres;
-    uint32_t xdpi;
-    uint32_t ydpi;
+    float xdpi;
+    float ydpi;
     int fd;
     bool isActive;
 };