summaryrefslogtreecommitdiff
path: root/common/lcd.c
Commit message (Collapse)AuthorAgeLines
* common/lcd: fix build breakage for at91sam9x5ek and trats boardsAnatolij Gustschin2012-09-24-4/+10
| | | | | | | | | | | | | | 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>
* common/lcd: add protection from null bmp pointerNikita Kiryanov2012-09-21-1/+1
| | | | | | | | | | | | 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>
* common lcd: simplify lcd_display_bitmapNikita Kiryanov2012-09-05-17/+27
| | | | | | | | | | | 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>
* common lcd: simplify core functionsNikita Kiryanov2012-09-05-32/+30
| | | | | | | | 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>
* common lcd: simplify lcd_displayNikita Kiryanov2012-09-05-9/+18
| | | | | | | 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>
* common lcd: simplify lcd_logoNikita Kiryanov2012-09-05-11/+1
| | | | | | | 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>
* common lcd: minor coding style changesNikita Kiryanov2012-07-10-121/+124
| | | | | | | No functional changes Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
* LCD: display 32bpp decompressed bitmap imageDonghwa Lee2012-05-25-3/+16
| | | | | | | 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>
* common/lcd.c: reduce one CONFIG_LCD_LOGO ifdefAnatolij Gustschin2012-05-25-3/+3
| | | | | | Drop ifdef around bitmap_plot(). Signed-off-by: Anatolij Gustschin <agust@denx.de>
* common/lcd.c: reduce some CONFIG_LCD_*_LOGO ifdefsAnatolij Gustschin2012-05-25-10/+6
| | | | | | | Move CONFIG_LCD_LOGO && !CONFIG_LCD_INFO_BELOW_LOGO ifdefs to lcd_drawchars() func. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* common/lcd.c: use ARRAY_SIZEAnatolij Gustschin2012-05-25-2/+2
| | | | | | Use available macro for obtaining the size of bmp_logo_palette[] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* PXA: Rename CONFIG_PXA2[57]X to CONFIG_CPU_PXA2[57]XMarek Vasut2011-12-06-6/+8
| | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* font: split font data from video_font.hChe-Liang Chiou2011-11-15-0/+1
| | | | | | | | | | | | | 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>
* tools: logo: split bmp arrays from bmp_logo.hChe-Liang Chiou2011-11-15-0/+1
| | | | | | | | | | | | | | 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>
* lcd: add clear and draw bitmap declarationChe-Liang Chiou2011-11-15-6/+10
| | | | | | | | | | 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>
* GCC4.6: Squash warnings in lcd.cMarek Vasut2011-10-01-4/+5
| | | | | | | | | | | 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>
* lcd: align fb writing address for horizontal display offsetLiu Ying2011-01-27-1/+1
| | | | | | | | | 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>
* Enable PXAFB for PXA27X and PXA3XXMarek Vasut2010-07-14-6/+6
|
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lcd: make 16bpp workAlessandro Rubini2010-03-24-4/+20
| | | | | | | | | 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>
* lcd: remove CONFIG_ATMEL_LCD ifdefs from lcd_setfgcolorAnatolij Gustschin2010-01-27-8/+0
| | | | | | | | | | | | 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>
* lcd: remove '#if 0' 32-bit scroll, now memcpy does itAlessandro Rubini2009-10-18-21/+0
| | | | | Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
* video: move extern declarations from C to headersAlessandro Rubini2009-07-25-16/+0
| | | | | | | | | | | | | | | | 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>
* stdio/device: rework function naming conventionJean-Christophe PLAGNIOL-VILLARD2009-07-18-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Added support for splash screen positioningMatthias Weisser2009-07-17-2/+37
| | | | | | | | | | 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>
* General help message cleanupWolfgang Denk2009-06-12-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lcd: Fix compilation warning in common/lcd.cAnatolij Gustschin2009-02-25-1/+4
| | | | | | | | | 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>
* LCD: support 8bpp BMPs on 16bpp displaysGuennadi Liakhovetski2009-02-24-25/+34
| | | | | | | | | 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>
* Add 16bpp BMP supportMark Jackson2009-02-24-10/+41
| | | | | | | | | | | | | 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>
* lcd_putc bug fix for tab.Derek Ou2009-02-21-1/+1
| | | | Signed-off-by: Derek Ou <dou@siconix.com>
* Command usage cleanupPeter Tyser2009-01-28-1/+1
| | | | | | | | 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>
* lcd: Let the board code show board-specific info cleanupPeter Tyser2008-12-07-1/+0
| | | | | | | remove unneeded version.h from lcd.c Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* lcd: Let the board code show board-specific infoHaavard Skinnemoen2008-10-27-79/+5
| | | | | | | | | | | | | 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>
* lcd: Set lcd_is_enabled before clearing the screenHaavard Skinnemoen2008-10-25-1/+1
| | | | | | | | 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>
* lcd: Implement lcd_printf()Haavard Skinnemoen2008-10-25-0/+14
| | | | | | | | | 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>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-7/+7
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* common: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-4/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* TQM823L: re-enable logo support; update LCD_INFO textWolfgang Denk2008-08-08-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Fix bitmap display for atmel lcd controllerMark Jackson2008-08-01-1/+5
| | | | | | | | | | | | | 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>
* Add gzipped logo supportMark Jackson2008-07-31-0/+13
| | | | | | | | | | | | | | 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>
* Code cleanup: fix old style assignment ambiguities like "=-" etc.Wolfgang Denk2008-07-14-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Fix printf() format issues with sizeof_t types by using %zuWolfgang Denk2008-07-14-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Cleanup nand_info[] declaration.Stelian Pop2008-05-13-1/+0
| | | | | | | | | The nand_info array is declared as extern in several .c files. Those days, nand.h contains a reference to the array, so there is no need to declare it elsewhere. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Add ATMEL LCD driverStelian Pop2008-05-10-1/+78
| | | | | | | | | | | This patch adds support for the ATMEL LCDC driver which is used on some AT91 and AVR platforms. Is has been tested with the AT91CAP9ADK, AT91SAM9261EK, AT91SAM9263EK and AT91SAM9RLEK boards. Adaptation for AVR32 should probably be easy. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* common/* non-cmd*: Remove obsolete references to CONFIG_COMMANDSJon Loeliger2007-07-08-2/+2
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* common/ non-cmd: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-04-1/+1
| | | | | | | | | | | | | | This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
* MCC200: Fix uninitialized variable problem in LCD driverWolfgang Denk2006-10-20-2/+5
|
* Coding style cleanupWolfgang Denk2006-10-09-2/+2
|
* Add splashscreen support for MCC200 board.Wolfgang Denk2006-08-30-3/+25
|
* GCC-4.x fixes: clean up global data pointer initialization for all boards.Wolfgang Denk2006-03-31-5/+2
|