27 Apr, 2018

2 commits

  • Fix build warning:
    common/lcd.c: In function 'lcd_clear':
    common/lcd.c:166:6: warning: variable 'bg_color' set but not used [-Wunused-but-set-variable]
    int bg_color;
    ^
    common/lcd.c: In function 'lcd_setmem':
    common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 2 has type 'u_long' [-Wformat=]
    debug("LCD panel info: %d x %d, %d bit/pix\n", panel_info.vl_col,
    ^
    common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long' [-Wformat=]

    Signed-off-by: Peng Fan
    (cherry picked from commit acfeb43685efb04423ce064c67228d15fa6d3da5)
    (cherry picked from commit 69a7c6f0877f4a984209f1be3e14ed5fe56928ad)

    Peng Fan
     
  • Support EPDC.
    E-Ink feature is supported by i.MX6DL/SL/SLL/ULL and i.MX7D.

    This driver supports user defined logo file, if there is no logo file, it will
    draw a black border around a white screen.

    If need to enable EPDC, a waveform file is required to let all
    work.

    Since we need LCD_MONOCHROME mode for EPDC, we introduce LCD_MONOCHROME
    support.

    Please refer to Linux Reference Manual for how to flash WAVEFORM file.

    Signed-off-by: Peng Fan
    Signed-off-by: Robby Cai
    Signed-off-by: Nitin Garg
    Signed-off-by: Ye.Li
    (cherry picked from commit a7244f279cc3c3994bcd103f5e9a183b1075ae71)

    Peng Fan
     

20 Aug, 2017

1 commit


16 Aug, 2017

1 commit

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

12 Jun, 2017

1 commit

  • There was for long time no activity in the 8xx area.
    We need to go further and convert to Kconfig, but it
    turned out, nobody is interested anymore in 8xx,
    so remove it (with a heavy heart, knowing that I remove
    here the root of U-Boot).

    Signed-off-by: Heiko Schocher

    Heiko Schocher
     

16 May, 2017

1 commit


27 Mar, 2016

1 commit


24 Jan, 2016

1 commit

  • The testpattern of the lcd was only working in 8bit mode(2x3 tiles in
    different colors). With this patch now 8bit and 16bit is supported.
    In 16bit mode there are 2x4 tiles in different colors.
    The number of LCD-colors is defined in the include/configs/.h

    Signed-off-by: Andreas Neubacher
    Signed-off-by: Anatolij Gustschin

    Andreas Neubacher
     

21 Jan, 2016

1 commit


02 Dec, 2015

1 commit


20 Nov, 2015

1 commit


13 Aug, 2015

1 commit

  • The following commit changed the order of the column vs. row parameter
    to the lcd_init_console() function but missed actually changing it as
    well the second time it is called from lcd_clear() which resulted in a
    garbled text console which this patch fixes.

    commit 604c7d4a5a3cf70949f6e6094bf0d52ee3b4804d
    common/lcd_console: introduce display/framebuffer rotation

    Tested on Colibri T20 with my latest assortment of tegra
    fixes/enhancements patch set.

    Signed-off-by: Marcel Ziswiler
    Acked-by: Simon Glass

    Marcel Ziswiler
     

11 Jun, 2015

2 commits


20 Apr, 2015

1 commit


19 Apr, 2015

1 commit


18 Apr, 2015

1 commit

  • Sometimes, for example if the display is mounted in portrait mode or even if it
    is mounted landscape but rotated by 180 degrees, we need to rotate our content
    of the display respectively the framebuffer, so that user can read the messages
    which are printed out.

    For this we introduce the feature called "CONFIG_LCD_ROTATION", this may be
    defined in the board-configuration if needed. After this the lcd_console will
    be initialized with a given rotation from "vl_rot" out of "vidinfo_t" which is
    provided by the board specific code.

    If CONFIG_LCD_ROTATION is not defined, the console will be initialized with
    0 degrees rotation.

    Signed-off-by: Hannes Petermaier
    Signed-off-by: Hannes Petermaier
    Acked-by: Nikita Kiryanov
    [agust: fixed 'struct vidinfo' has no member named 'vl_rot' errors]
    Signed-off-by: Anatolij Gustschin

    Hannes Petermaier
     

10 Feb, 2015

12 commits

  • lcd_logo() currently performs tasks well beyond just displaying the logo.
    It has code which displays splash image, it has logic which determines
    when the different display features are displayed, and it is coupled with
    the lcd console because it holds the responsibility of returning the
    lcd console base address.

    Make lcd_logo() just about the logo by:
    * Moving splash image display code into a dedicated function
    * Moving the logic regarding when various features are displayed to
    lcd_clear() (which is arguably not the correct name for housing such
    code either, but it is currently the most fitting location code wise)
    * Move the responsibility of setting the console base address to
    lcd_clear() too.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • We now have api functions that can support compiling simplefb code as its own
    module. Since this code is not part of the display functionality, extract it
    to its own file.

    Raspberry Pi is updated to accommodate the changes.

    Signed-off-by: Nikita Kiryanov
    Acked-by: Stephen Warren
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin
    Cc: Stephen Warren

    Nikita Kiryanov
     
  • The name "bitmap_plot" is misleading because it implies that this is a generic
    function capable of dealing with any bitmap, but its implementation only works
    with the logo data.

    Rename the function to better reflect this.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • This cleanup mostly focuses on removing unnecessary whitespace and comments
    which are superfluous and/or do not conform to the coding style.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Remove unused includes.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the lcd_display_bitmap #ifdef complexity by extracting Atmel-specific
    code for setting cmap for bitmap images into a new function lcd_set_cmap().
    A default version is implemented with the remainder of the code.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Get rid of platform-specific #ifdefs in bitmap_plot() by moving the generic
    case of setting cmap into the weak lcd_logo_set_cmap().

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the bitmap_plot #ifdef complexity by extracting MPC823-specific code for
    setting cmap into its own implementation of lcd_logo_set_cmap(), implemented in
    mpc8xx_lcd.c. In the MPC823 implementation, ARRAY_SIZE(bmp_logo_palette) is
    switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which
    would cause a compilation error because the logo data and palette arrays would
    be defined twice.

    This is a step towards cleaning bitmap_plot() of platform-specific code.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the bitmap_plot #ifdef complexity by extracting Atmel-specific code for
    setting cmap into a new function lcd_logo_set_cmap(), which is implemented in
    atmel_lcdfb driver and defined as part of common/lcd.c api with a weak dummy
    version. In the Atmel implementation, ARRAY_SIZE(bmp_logo_palette) is
    switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which
    would cause a compilation error because the logo data and palette arrays would
    be defined twice.

    This is a step towards cleaning bitmap_plot() of platform-specific code.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the amount of platform-specific code in common/lcd.c by moving MPC823
    implementation of fb_put_byte() to mpc8xx_lcd.c. Since we must also have a
    default implementation for everybody else, make the remainder of the code
    into a weak function.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the amount of platform-specific code in common/lcd.c by moving Atmel
    implementation of fb_put_word() to atmel_lcdfb.c. Since we must also have a
    default implementation for everybody else, make the remainder of the code
    into a weak function.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Acked-by: Bo Shen
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • configuration_get_cmap() is multiple platform-specific functions stuffed into
    one function. Split it into multiple versions, and move each version to the
    appropriate driver to reduce the #ifdef complexity.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     

29 Jan, 2015

1 commit

  • This commit 904672e (lcd: refactor lcd console stuff into its
    own file), which cause lcd console address is not initialized.

    This patch initialize the lcd console use the default value,
    will be update when splash screen is enabled.

    Signed-off-by: Bo Shen

    Bo Shen
     

11 Jan, 2015

10 commits

  • common/lcd.c is a mix of code portions that do different but related
    things. To improve modularity, the various code portions should be split
    into their own modules. Separate lcd console code into its own file.

    Signed-off-by: Nikita Kiryanov
    Cc: Anatolij Gustschin
    Cc: Simon Glass
    Cc: Stephen Warren
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Nikita Kiryanov
     
  • lcd_logo() has the following return value:

    #if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
    return (void *)((ulong)lcd_base + BMP_LOGO_HEIGHT * lcd_line_length);
    #else
    return (void *)lcd_base;
    #endif

    This return value gets assigned to lcd_console_address.
    lcd_console_address is not assigned or modified anywhere else.
    Thus:

    #if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO):
    y' = BMP_LOGO_HEIGHT + y;
    lcd_base + y' * lcd_line_length ==
    lcd_base + (BMP_LOGO_HEIGHT + y) * lcd_line_length ==
    lcd_base + BMP_LOGO_HEIGHT * lcd_line_length + y * lcd_line_length ==
    lcd_console_address + y * lcd_line_length
    #else
    lcd_base + y * lcd_line_length == lcd_console_address + y * lcd_line_length
    #endif

    This is a preparatory step for extracting lcd console code into its own
    file.

    Signed-off-by: Nikita Kiryanov
    Cc: Anatolij Gustschin
    Cc: Simon Glass

    Nikita Kiryanov
     
  • Introduce lcd_getbgcolor() and lcd_getfgcolor(), and use them where
    applicable.

    This is a preparatory step for extracting lcd console code into its own
    file.

    Signed-off-by: Nikita Kiryanov
    Cc: Anatolij Gustschin
    Cc: Simon Glass
    Acked-by: Simon Glass

    Nikita Kiryanov
     
  • COLOR_MASK macro doesn't do anything; Remove it to reduce visual
    complexity.

    This is a preparatory step for extracting lcd console code into its own
    file.

    Signed-off-by: Nikita Kiryanov
    Cc: Anatolij Gustschin
    Cc: Simon Glass
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Nikita Kiryanov
     
  • Introduce set_console_row(), set_console_col(), and lcd_init_console().
    Use these functions in lcd functions: lcd_init(), lcd_clear(), lcd_logo().

    This is a preparatory step for extracting lcd console code into its own
    file.

    Signed-off-by: Nikita Kiryanov
    Cc: Anatolij Gustschin
    Cc: Simon Glass
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Nikita Kiryanov
     
  • Replace CONSOLE_(ROWS|COLS) macros with variables, and assign the
    original macro values.

    This is a preparatory step for extracting lcd console code into its own
    file.

    Signed-off-by: Nikita Kiryanov
    Cc: Anatolij Gustschin
    Cc: Simon Glass
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Nikita Kiryanov
     
  • Rename console_(row|col) to console_curr_(row|col) to better distinguish
    it from console_(rows|cols).

    This is a preparatory step for extracting lcd console code into its own file.

    Signed-off-by: Nikita Kiryanov
    Cc: Simon Glass
    Cc: Anatolij Gustschin
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Nikita Kiryanov
     
  • No one is using LCD_MONOCHROME; remove related code.

    Signed-off-by: Nikita Kiryanov
    Cc: Wolfgang Denk
    Cc: Anatolij Gustschin
    Acked-by: Simon Glass

    Nikita Kiryanov
     
  • Remove code duplication from lcd_drawchars().

    Signed-off-by: Nikita Kiryanov
    Cc: Anatolij Gustschin
    Cc: Simon Glass
    Acked-by: Simon Glass

    Nikita Kiryanov
     
  • No one is using CONFIG_SYS_INVERT_COLORS; remove related code.

    Signed-off-by: Nikita Kiryanov
    Cc: Simon Glass
    Cc: Anatolij Gustschin
    Acked-by: Simon Glass

    Nikita Kiryanov