]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/lcd.c
arm64: MAKEALL, filter armv8 boards from LIST_arm
[karo-tx-uboot.git] / common / lcd.c
index 8d5c63c29ef924166576d9d3793379429acfe0e4..56bf067fb5e13dcc8c769044b844836d01ad92e2 100644 (file)
@@ -4,7 +4,7 @@
  * (C) Copyright 2001-2002
  * Wolfgang Denk, DENX Software Engineering -- wd@denx.de
  *
- * SPDX-License-Identifier:    GPL-2.0+ 
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /************************************************************************/
@@ -51,7 +51,6 @@
 /* ** FONT DATA                                                                */
 /************************************************************************/
 #include <video_font.h>                /* Get font data, width and height      */
-#include <video_font_data.h>
 
 /************************************************************************/
 /* ** LOGO DATA                                                                */
@@ -387,8 +386,13 @@ static void test_pattern(void)
 /************************************************************************/
 /* ** GENERIC Initialization Routines                                  */
 /************************************************************************/
-
-int lcd_get_size(int *line_length)
+/*
+ * With most lcd drivers the line length is set up
+ * by calculating it from panel_info parameters. Some
+ * drivers need to calculate the line length differently,
+ * so make the function weak to allow overriding it.
+ */
+__weak int lcd_get_size(int *line_length)
 {
        *line_length = (panel_info.vl_col * NBITS(panel_info.vl_bpix)) / 8;
        return *line_length * panel_info.vl_row;
@@ -496,7 +500,6 @@ static int lcd_init(void *lcdbase)
        debug("[LCD] Using LCD frambuffer at %p\n", lcd_base);
 
        lcd_get_size(&lcd_line_length);
-       lcd_line_length = (panel_info.vl_col * NBITS(panel_info.vl_bpix)) / 8;
        lcd_is_enabled = 1;
        lcd_clear();
        lcd_enable();