summaryrefslogtreecommitdiff
path: root/common/lcd.c
AgeCommit message (Collapse)Author
2011-08-29Correct cast in LCD cache flushSimon Glass
This case was incorrect and gives warnings on 64-bit machines. BUG=chromium-os:19353 TEST=build and boot on Seaboard Change-Id: Id467aa27100701e971ddcddfec57347f79675d99 Reviewed-on: http://gerrit.chromium.org/gerrit/6522 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2011-08-29Fix compiler warnings generated by gcc 4.6.Vadim Bendebury
The newer compiler version is more thorough in detecting code inconsistencies, and reports warnings in many cases when building u-boot for kaen and alex. This change modifies the code to get rid of the warnings. There supposed to be no logical changes, so no testing other than building the system is being done. The files not yet upstreamed are excluded and will be submitted separately. BUG=chromium-os:18862 TEST=manual . run the following commands emerge-tegra2_kaen chromeos-u-boot emerge-x86-alex chromeos-u-boot . observe them succeed Change-Id: I4c872d84352539d24a418ba910274d08d02d26a8 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/5706 Reviewed-by: Simon Glass <sjg@chromium.org>
2011-08-29Implement shared display support.Vadim Bendebury
This change fills up the stubs in lib/vbexport/display.c to provide support on both ARM (where LCD driver is used) and X86 (where the CFB driver is used) platforms. BUG=chrome-os-partner:4552 TEST=manual On X86 (alex with a Dediprog programmer connected to it), run the following commands: . emerge-x86-alex vboot_reference-firmware chromeos-u-boot chromeos-coreboot dd if=/build/x86-alex/coreboot/coreboot.rom of=/tmp/coreboot seek=3584 bs=1K sudo flashrom -p dediprog -w /tmp/coreboot . Reboot the machine, observe it come up to boot> prompt, start ChromeOS (using the `boot' cli command). On ARM (tegra2_kaen) . emerge-tegra2_kaen vboot_reference-firmware chromeos-u-boot chromeos-bootimage . program the resulting image into Kaen, restart it, observe the machine come up. . install the new OS image on the machine, restart it, observe the machine come up. . request recovery reboot using crossystem, restart the machine, observe it come up in recovery request mode. This test case actually failed: the system did show the recovery request screen, but then proceeded to boot from the plugged in USB stick (it was supposed to wait for the stick to be removed/reinserted) Change-Id: I75310de3f93464645cc9e61237f65d7d19b71873 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/4886 Reviewed-by: Stefan Reinauer <reinauer@google.com>
2011-08-29Fix LCD corruptionsSimon Glass
Add missing lcd_syncs on compressed bitmap display and "echo" command. BUG=chromium-os:17779 TEST=start U-Boot; vboot; see that recovery screen is fully drawn. Change-Id: I675f2c60dc53b9e853157d3670a07e7a6c8eee3c Reviewed-on: http://gerrit.chromium.org/gerrit/4328 Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> Reviewed-by: Puneet Kumar <puneetster@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2011-08-29Add support for flushing LCD frame buffer from dcache after updateSimon Glass
This provides an option for the LCD to flush the dcache after each update (puts, scroll or clear). BUG=chromium-os:17047 TEST=build U-Boot with option enabled and cache in write-through mode. Observe that no 'speckling' happens and all data appears on the LCD immediately. Change-Id: Id5fe06dea827219e97c3c7698896a81700fe61da Reviewed-on: http://gerrit.chromium.org/gerrit/3312 Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anton Staaf <robotboy@chromium.org>
2011-08-29fix compiler warning of common/lcd.cChe-Liang Chiou
BUG=chromium-os:16508 TEST=build w/o warnings Change-Id: I91c776da1929de52c2b5a405c2f42196fbe38e7e Reviewed-on: http://gerrit.chromium.org/gerrit/3064 Tested-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
2011-08-29Add CONFIG_ALIGN_LCD_TO_SECTION to make frame buffer MMU-friendlySimon Glass
We want to make the display section-aligned on ARM so that we can easily turn off data caching for this. BUG=chromium-os:13082 TEST=build and boot U-Boot on seaboard Change-Id: Icbbc8cc473ff80b519bdd1c6520c9ed679260843 Reviewed-on: http://gerrit.chromium.org/gerrit/2240 Reviewed-by: Anton Staaf <robotboy@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2011-08-24Fix LCD clear functionSimon Glass
This was broken by an earlier commit related to verified boot. BUG=chromium-os:13228 TEST=Build, check that there is no build error Change-Id: I0c6360052c41572669d0b9b90f4222034cb27b3f Reviewed-on: http://gerrit.chromium.org/gerrit/1765 Reviewed-by: Anton Staaf <robotboy@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2011-08-24Fix compiler warning of include/lcd.hChe-Liang Chiou
include/lcd.h:240: warning: function declaration isn't a prototype BUG=none TEST=build without above compiler warning Review URL: http://codereview.chromium.org/6648027 Change-Id: I0dbfd8ebce4e71e28c073fd4f074d438211060ec
2011-08-24Make lcd_clear as non-static such that other parts can call it.Tom Wai-Hong Tam
BUG=chromium-os:1305 TEST=emerge-tegra2_seaboard chromeos-u-boot-next successfully Change-Id: Ia1382a4545c2209e830b14909af635753ad40472 Review URL: http://codereview.chromium.org/6651016
2011-08-24Add return value in lcd_display_rle8_bitmap and reorganize it.Tom Wai-Hong Tam
Change-Id: I6dcd790f7cc4db1d429d516b183b9dce2b4677ea BUG=None TEST=emerge-tegra2_seaboard chromeos-u-boot-next Review URL: http://codereview.chromium.org/6546054
2011-08-24Speed up RLE8 bitmap decoding, each frame from 497ms to 87ms.Tom Wai-Hong Tam
- Aggregate the same code into one. - Sepearte critical code into functions, better locality. - Loop unrolling. BUG=chromium-os:10499 TEST=build, boot, and "bmp display BMP_ADDR" to render a RLE8 bitmap. Change-Id: I2ebab4f29ac41048afdfccb6f9d69292f1150c54 Review URL: http://codereview.chromium.org/6189004
2011-08-24Implement RLE8 bitmap decoding.Tom Wai-Hong Tam
Reference: http://www.digicamsoft.com/bmp/bmp.html BUG=chromium-os:10499 TEST=build, boot, and "bmp display BMP_ADDR" to render a RLE8 bitmap. Change-Id: Ie896aee6b471d62cf52196c1ceba40c6dfddb457 Review URL: http://codereview.chromium.org/6113001
2011-08-24Fix BMP rendering bug, wrong fb offset calculation for bpix == 16.Tom Wai-Hong Tam
For bpix == 16, each pixel is 2-byte. fb offset should shift more x bytes. BUG=chromium-os:10499 TEST=build, boot, and "bmp display BMP_ADDR 100 100" to see the right offset. Change-Id: I72fe585d0d8d6f44c66b1a379e575c8f00f1a91d Review URL: http://codereview.chromium.org/6110001
2011-08-24Fix BMP decode bug that skips the wrong padded row.Tom 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 BUG=10499 TEST=build, boot, and "bmp display" a BMP that its width is not a multiple of 4. Change-Id: Icbeb037e0f432f9d68b4c2dc459bac2c4bb41fe8 Review URL: http://codereview.chromium.org/6020016
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>
2008-05-13Cleanup nand_info[] declaration.Stelian Pop
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>
2008-05-10Add ATMEL LCD driverStelian Pop
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>
2007-07-08common/* non-cmd*: Remove obsolete references to CONFIG_COMMANDSJon Loeliger
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04common/ non-cmd: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger
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>
2006-10-20MCC200: Fix uninitialized variable problem in LCD driverWolfgang Denk
2006-10-09Coding style cleanupWolfgang Denk
2006-08-30Add splashscreen support for MCC200 board.Wolfgang Denk
2006-03-31GCC-4.x fixes: clean up global data pointer initialization for all boards.Wolfgang Denk
2005-10-13Cleanup for GCC-4.xWolfgang Denk