VIGS: change min dpi constraint
authorVasiliy Ulyanov <v.ulyanov@samsung.com>
Mon, 17 Aug 2015 14:07:37 +0000 (17:07 +0300)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 20 Aug 2015 04:25:58 +0000 (13:25 +0900)
This is a workaround for output phys dimensions computation. In some
cases we need a smaller dpi in order to make Xorg calculate display
coordinates properly.

Change-Id: I40b7215d1aefcc7e63a98239501a937466ac5579
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
drivers/gpu/drm/vigs/vigs_output.c

index 77b83b1..f8d6813 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/init.h>
 
 #define DPI_DEF_VALUE 3160
-#define DPI_MIN_VALUE 1000
+#define DPI_MIN_VALUE 100
 #define DPI_MAX_VALUE 4800
 
 #ifndef MODULE
@@ -272,14 +272,12 @@ int vigs_output_get_dpi(void)
     int dpi = DPI_DEF_VALUE;
 #ifndef MODULE
     char *str;
-    char dpi_info[16];
 
     str = strstr(saved_command_line, "dpi=");
 
     if (str != NULL) {
         str += 4;
-        strncpy(dpi_info, str, 4);
-        dpi = vigs_atoi(dpi_info);
+        dpi = vigs_atoi(str);
         if ((dpi < DPI_MIN_VALUE) || (dpi > DPI_MAX_VALUE)) {
             dpi = DPI_DEF_VALUE;
         }