[Title]fix unmerged contents of calculate dpi value
authormunkyu.im <munkyu.im@samsung.com>
Tue, 3 Apr 2012 05:11:11 +0000 (14:11 +0900)
committermunkyu.im <munkyu.im@samsung.com>
Tue, 3 Apr 2012 05:11:11 +0000 (14:11 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

drivers/maru/maru_fb.c

index 5ab50ae8a73342bbb7a659c020799c2638bee6b0..31a024530ca77056855d9f7adc16f2445bef41f6 100644 (file)
@@ -309,9 +309,9 @@ static int my_atoi(const char *name)
 }
 
 extern char *saved_command_line;
-#define DPI_DEF_VALUE          316
-#define DPI_MIN_VALUE          100
-#define DPI_MAX_VALUE          480
+#define DPI_DEF_VALUE          3160
+#define DPI_MIN_VALUE          1000
+#define DPI_MAX_VALUE          4800
 
 static void uvesafb_setup_var(struct fb_var_screeninfo *var,
                struct fb_info *info, struct vbe_mode_ib *mode)
@@ -337,11 +337,11 @@ static void uvesafb_setup_var(struct fb_var_screeninfo *var,
                        dpi = DPI_DEF_VALUE;
        }
     /* round up */
-       var->height = ((var->yres * 254 / dpi) + 5) / 10;
-       var->width = ((var->xres * 254 / dpi)+ 5) / 10;
-       //printk(KERN_INFO "dpi value = %d\n", dpi);
-       //printk(KERN_INFO "var->yres = %d, var->xres = %d\n", var->yres, var->xres);
-       //printk(KERN_INFO "var->height = %d, var->width = %d\n", var->height, var->width);
+       var->height = ((var->yres * 2540 / dpi) + 5) / 10;
+       var->width = ((var->xres * 2540 / dpi)+ 5) / 10;
+//  printk(KERN_INFO "dpi value = %d\n", dpi);
+//     printk(KERN_INFO "var->yres = %d, var->xres = %d\n", var->yres, var->xres);
+//     printk(KERN_INFO "var->height = %d, var->width = %d\n", var->height, var->width);
 
        var->xres_virtual = mode->x_res;
        var->yres_virtual = (par->ypan) ?