summaryrefslogtreecommitdiff
path: root/common/lcd.c
AgeCommit message (Collapse)Author
2013-01-14lcd: restore ability to display 8 bpp BMPs on 16 bpp LCDsNikita Kiryanov
Commit fb6a9aab7ae78c (LCD: display 32bpp decompressed bitmap image) broke the check that allowed U-Boot to display 8 bpp BMPs on a 16 bpp LCD screen, effectively turning this feature off. Restore this feature by changing the check back to the same meaning it originally had. To avoid future confusion, the check has also been rephrased to make its meaning clear. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2012-12-10Merge branch 'master' of git://git.denx.de/u-boot into resolveMinkyu Kang
Conflicts: README board/samsung/universal_c210/universal.c drivers/misc/Makefile drivers/power/power_fsl.c include/configs/mx35pdk.h include/configs/mx53loco.h include/configs/seaboard.h
2012-11-19lcd: Add CONFIG_CONSOLE_SCROLL_LINES option to speed consoleSimon Glass
When the cursor position gets to the end of the LCD console we normally scroll by one line. This adds an option to increase that value. Console scrolling is often slow, and if a large amount of output is being sent, increasing this option to 10 or so will speed things up considerably. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-11-19lcd: Add support for flushing LCD fb from dcache after updateSimon Glass
This provides an option for the LCD to flush the dcache after each update (puts, scroll or clear). Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-11-19lcd: Add CONFIG_LCD_ALIGNMENT to select frame buffer alignmentSimon Glass
The normal alignment is PAGE_SIZE, but if this is defined, we can support other alignments. The motivation for this change is to make the display section-aligned on ARM so that we can easily turn off data caching for the frame buffer region without resorting to level 2 page tables. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-11-07lcd: Implement RLE8 bitmap decodingTom Wai-Hong Tam
Add support for drawing compressed RLE8 bitmaps. Reference: http://www.digicamsoft.com/bmp/bmp.html Signed-off-by: Che-Liang Chiou <clchiou@chromium.org> Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Che-Liang Chiou <clchiou@chromium.org> [agust: fix some minor style issues and build warnings] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-11-07lcd: Fix BMP decode bug that skips the wrong padded rowTom Wai-Hong Tam
This change fixed 2 things: - Rename padded_line to padded_width since it is (width + padded_row) not line. - When finished a line, should skip the padded_row that is (padded_width - width) instead of (width - padded_width). Reference: http://en.wikipedia.org/wiki/BMP_file_format Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2012-11-07lcd: Provide an API to access LCD parametersVadim Bendebury
Create a basic API to provide access to lcd parameters such as screen size, and to position the cursor on the screen. This matches up with the video API for the same purpose. Unfortunately they are not yet combined. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2012-09-24common/lcd: fix build breakage for at91sam9x5ek and trats boardsAnatolij Gustschin
Commit 203c37b8c5556aad1901ce4954792afd718c7d42 (common lcd: simplify core functions) and commit bfdcc65e1163b4891643c2a670570c478b9af2a4 (common lcd: simplify lcd_display_bitmap) caused build breakage for at91sam9x5ek board configurations and for trats board. Fix these build errors. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
2012-09-21common/lcd: add protection from null bmp pointerNikita Kiryanov
If the bmp pointer is null then U-Boot will get stuck when trying to load the image. What's worse, it will get stuck before the U-Boot shell becomes available to the user, thus making it difficult to correct the situation. To protect from the above scenario, check if the pointer is valid. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
2012-09-05common lcd: simplify lcd_display_bitmapNikita Kiryanov
Move highly platform dependant code into its own functions to reduce the number of #ifdefs in lcd_display_bitmap To avoid breaking the mcc200 board which does not #define CONFIG_CMD_BMP, this patch also implements bmp_display() for mcc200. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2012-09-05common lcd: simplify core functionsNikita Kiryanov
Move highly platform dependant code into its own function to reduce the number of #ifdefs in the bigger functions Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2012-09-05common lcd: simplify lcd_displayNikita Kiryanov
Simplify lcd_display by centralizing code into a funciton Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2012-09-05common lcd: simplify lcd_logoNikita Kiryanov
Simplify lcd_logo by extracting bmp unzip into its own function. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2012-07-10common lcd: minor coding style changesNikita Kiryanov
No functional changes Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2012-05-25LCD: display 32bpp decompressed bitmap imageDonghwa Lee
This patch supports drawing 32bpp decompressed bitmap image. Signed-off-by: Donghwa Lee <dh09.lee@samsung.com> Signed-off-by: Kyungmin.park <kyungmin.park@samsung.com>
2012-05-25common/lcd.c: reduce one CONFIG_LCD_LOGO ifdefAnatolij Gustschin
Drop ifdef around bitmap_plot(). Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-05-25common/lcd.c: reduce some CONFIG_LCD_*_LOGO ifdefsAnatolij Gustschin
Move CONFIG_LCD_LOGO && !CONFIG_LCD_INFO_BELOW_LOGO ifdefs to lcd_drawchars() func. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-05-25common/lcd.c: use ARRAY_SIZEAnatolij Gustschin
Use available macro for obtaining the size of bmp_logo_palette[] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-12-06PXA: Rename CONFIG_PXA2[57]X to CONFIG_CPU_PXA2[57]XMarek Vasut
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-15font: split font data from video_font.hChe-Liang Chiou
While video_font.h is useful even without referencing the font data, it is not possible to be included multiple times because it defines font data array right in the header. This patch splits the font data array into video_font_data.h and so now video_font.h can be included multiple times. This at least solves the code duplication in board/mcc200/lcd.c. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-11-15tools: logo: split bmp arrays from bmp_logo.hChe-Liang Chiou
The generated header bmp_logo.h is useful even outside common/lcd.c for the logo dimension. However, the problem is, the generated bmp_logo.h cannot be included multiple times because bmp_logo_palette[] and bmp_logo_bitmap[] are defined in the bmp_logo.h. This patch fixes this by defining these arrays in another header bmp_logo_data.h and in bmp_logo.h only declaring these arrays. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-15lcd: add clear and draw bitmap declarationChe-Liang Chiou
The functions for clearing and drawing bitmaps on the screen were not exposed publicly and are made public in this patch in preparation for implementing the display interface of api_public.h. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-10-01GCC4.6: Squash warnings in lcd.cMarek Vasut
lcd.c: In function ‘lcd_drawchars’: lcd.c:214:9: warning: variable ‘off’ set but not used [-Wunused-but-set-variable] lcd.c: In function ‘lcd_display_bitmap’: lcd.c:617:16: warning: variable ‘compression’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-01-27lcd: align fb writing address for horizontal display offsetLiu Ying
CONFIG_SPLASH_SCREEN_ALIGN makes uboot support display offset for splashimage. The framebuffer writing address should be calculated according to different kinds of framebuffer pixel format, i.e., bits per pixel value. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
2010-07-14Enable PXAFB for PXA27X and PXA3XXMarek Vasut
2010-07-04Make sure that argv[] argument pointers are not modified.Wolfgang Denk
The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
2010-03-24lcd: make 16bpp workAlessandro Rubini
Support for 16bpp was supposed to be in the code but was not working. This makes it work and has been tested in the nhk8815 board. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-01-27lcd: remove CONFIG_ATMEL_LCD ifdefs from lcd_setfgcolorAnatolij Gustschin
Not all boards defining LCD_COLOR16 are able to set lcd_color_fg/lcd_color_bg correctly. The issue seems to be caused by CONFIG_ATMEL_LCD ifdefs in lcd_setfgcolor() and lcd_setbgcolor(). Actually, the color values passed to these functions are already correct, we don't need to fix them. So remove ifdefs here. Reported-by: Alessandro Rubini <rubini@unipv.it> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-10-18lcd: remove '#if 0' 32-bit scroll, now memcpy does itAlessandro Rubini
Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
2009-07-25video: move extern declarations from C to headersAlessandro Rubini
This moves some extern declaration from lcd.c to lcd.h, removing unneeded ifdef around a pair of them. Additionally, since gunzip_bmp() was declared static in cmd_bmp.c but extern in lcd.c, I removed the static. The extra "#include <lcd.h>" in cmd_bmp.c is added to ensure the header is consistent with the source. This has been compile-tested on both ARM (at91 boards) and PowerPC (HH405_config, TQM823L_LCD_config, mcc200_config), to test all use combinations. Signed-off-by: Alessandro Rubini <rubini@gnudd.it> [agust@denx.de: removed gunzip_bmp() fixes as commit c01171ea did it] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-18stdio/device: rework function naming conventionJean-Christophe PLAGNIOL-VILLARD
So far the console API uses the following naming convention: ======Extract====== typedef struct device_t; int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); ======= which is too generic and confusing. Instead of using device_XX and device_t we change this into stdio_XX and stdio_dev This will also allow to add later a generic device mechanism in order to have support for multiple devices and driver instances. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-17Added support for splash screen positioningMatthias Weisser
This patch adds support splash image positioning by adding an additional variable "splashpos" to the environment. Please see README for details. Signed-off-by: Matthias Weisser <matthias.weisser@graf-syteco.de> Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-06-12General help message cleanupWolfgang Denk
Many of the help messages were not really helpful; for example, many commands that take no arguments would not print a correct synopsis line, but "No additional help available." which is not exactly wrong, but not helpful either. Commit ``Make "usage" messages more helpful.'' changed this partially. But it also became clear that lots of "Usage" and "Help" messages (fields "usage" and "help" in struct cmd_tbl_s respective) were actually redundant. This patch cleans this up - for example: Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat. After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dtt Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-02-25lcd: Fix compilation warning in common/lcd.cAnatolij Gustschin
Fix following warning while compilation for mcc200 board: lcd.c: In function 'lcd_display_bitmap': lcd.c:625: warning: unused variable 'cmap' Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-02-24LCD: support 8bpp BMPs on 16bpp displaysGuennadi Liakhovetski
This patch also simplifies some ifdefs in lcd.c, introduces a generic vidinfo_t, which new drivers are encouraged to use and old drivers to switch over to. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Acked-by: Anatolij Gustschin <agust@denx.de>
2009-02-24Add 16bpp BMP supportMark Jackson
This patch adds 16bpp BMP support to the common lcd code. Use CONFIG_BMP_16BPP and set LCD_BPP to LCD_COLOR16 to enable the code. At the moment it's only been tested on the MIMC200 AVR32 board, but extending this to other platforms should be a simple task !! Signed-off-by: Mark Jackson <mpfj@mimc.co.uk> Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Acked-by: Anatolij Gustschin <agust@denx.de>
2009-02-21lcd_putc bug fix for tab.Derek Ou
Signed-off-by: Derek Ou <dou@siconix.com>
2009-01-28Command usage cleanupPeter Tyser
Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-12-07lcd: Let the board code show board-specific info cleanupPeter Tyser
remove unneeded version.h from lcd.c Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-27lcd: Let the board code show board-specific infoHaavard Skinnemoen
The information displayed when CONFIG_LCD_INFO is set is inherently board-specific, so it should be done by the board code. The current code dealing with this only handles two cases, and is already a horrible mess of #ifdeffery. Yes, this duplicates some code, but it also allows boards to print more board-specific information; this used to be very difficult. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-10-25lcd: Set lcd_is_enabled before clearing the screenHaavard Skinnemoen
This allows the logo/info rendering routines to use the regular lcd_putc/lcd_puts/lcd_printf calls. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-10-25lcd: Implement lcd_printf()Haavard Skinnemoen
lcd_printf() has a prototype in include/lcd.h but no implementation. Fix this by borrowing the lcd_printf() implementation from the cogent board code (which appears to use its own LCD framework.) Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13common: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-08TQM823L: re-enable logo support; update LCD_INFO textWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-01Fix bitmap display for atmel lcd controllerMark Jackson
The current lcd_display_bitmap() function does not work properly for the Atmel LCD controller. 2 fixes need to be done:- (a) when setting the colour map, use the lcd_setcolreg() function as provided by the Atmel driver (b) the data is never actually written to the lcd framebuffer !! Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2008-07-31Add gzipped logo supportMark Jackson
The README file states that CONFIG_VIDEO_BMP_GZIP behaves as follows: If this option is set, additionally to standard BMP images, gzipped BMP images can be displayed via the splashscreen support or the bmp command. However, the splashscreen function *only* supports standard BMP images. This patch adds the documented gzip support. Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2008-07-14Code cleanup: fix old style assignment ambiguities like "=-" etc.Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-14Fix printf() format issues with sizeof_t types by using %zuWolfgang Denk
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>