VIGS: Correct the physical screen size
authorjinhyung.jo <jinhyung.jo@samsung.com>
Fri, 4 Sep 2015 03:19:17 +0000 (12:19 +0900)
committerJinhyung Jo <jinhyung.jo@samsung.com>
Fri, 20 Nov 2015 09:11:36 +0000 (18:11 +0900)
Use the correct value instead multiplied by 10.

Change-Id: I7f3145c6d7700f39b15b6890b7048044a9ef4c26
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
(cherry picked from commit 90b49e93c265b1d88e047f20705cc8f0f48a75fd)

drivers/gpu/drm/vigs/vigs_output.c

index f8d6813..84f7890 100644 (file)
@@ -3,9 +3,9 @@
 #include "drm_crtc_helper.h"
 #include <linux/init.h>
 
-#define DPI_DEF_VALUE 3160
+#define DPI_DEF_VALUE 316
 #define DPI_MIN_VALUE 100
-#define DPI_MAX_VALUE 4800
+#define DPI_MAX_VALUE 600
 
 #ifndef MODULE
 static int vigs_atoi(const char *str)
@@ -288,10 +288,10 @@ int vigs_output_get_dpi(void)
 
 int vigs_output_get_phys_width(int dpi, u32 width)
 {
-    return ((width * 2540 / dpi) + 5) / 10;
+    return ((width * 254 / dpi) + 5) / 10;
 }
 
 int vigs_output_get_phys_height(int dpi, u32 height)
 {
-    return ((height * 2540 / dpi) + 5) / 10;
+    return ((height * 254 / dpi) + 5) / 10;
 }