]> git.sur5r.net Git - u-boot/blobdiff - drivers/video/exynos_fb.c
video:cache:fix: Enable dcache flush at LCD subsystem for Exynos based boards
[u-boot] / drivers / video / exynos_fb.c
index e31a0fd500abef1bc46c9e0518e7bc2e8639db3d..aac74a3c68efc5349685fba8a10ae8f0819e5f0d 100644 (file)
@@ -63,6 +63,9 @@ static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t *vid)
 static void exynos_lcd_init(vidinfo_t *vid)
 {
        exynos_fimd_lcd_init(vid);
+
+       /* Enable flushing after LCD writes if requested */
+       lcd_set_flush_dcache(1);
 }
 
 static void draw_logo(void)
@@ -70,8 +73,19 @@ static void draw_logo(void)
        int x, y;
        ulong addr;
 
-       x = ((panel_width - panel_info.logo_width) >> 1);
-       y = ((panel_height - panel_info.logo_height) >> 1) - 4;
+       if (panel_width >= panel_info.logo_width) {
+               x = ((panel_width - panel_info.logo_width) >> 1);
+       } else {
+               x = 0;
+               printf("Warning: image width is bigger than display width\n");
+       }
+
+       if (panel_height >= panel_info.logo_height) {
+               y = ((panel_height - panel_info.logo_height) >> 1) - 4;
+       } else {
+               y = 0;
+               printf("Warning: image height is bigger than display height\n");
+       }
 
        addr = panel_info.logo_addr;
        bmp_display(addr, x, y);