summaryrefslogtreecommitdiffstats
path: root/drivers/video/cfb_console.c
Commit message (Collapse)AuthorAgeFilesLines
* video: Add S3C24xx framebuffer supportMarek Vasut2016-02-221-1/+1
| | | | | | | | | | | | | | Add basic framebuffer driver for the S3C24xx family of CPUs. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Vladimir Zapolskiy <vz@mleia.com> V2: Keep the Makefile sorted. Acked-by: Anatolij Gustschin <agust@denx.de>
* video: input: Clean up after i8042 conversionSimon Glass2015-11-191-16/+4
| | | | | | | | | Now that i8042 uses driver model, adjust other mentions of it and remove old code that is no-longer used. Update the README and unify the keyboard text into one place. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* video: Drop unused console functionsSimon Glass2015-11-191-53/+9
| | | | | | | | | | | | | | | | | | CONFIG_CONSOLE_CURSOR, CONFIG_SYS_CONSOLE_BLINK_COUNT and CONFIG_CONSOLE_TIME are not used by any board. The implementation is not great and stands in the way of a refactor of i8042. Drop these for now. They can be re-introduced quite easily later, perhaps with driver-model real-time-clock (RTC) support. When reintroducing, it might be useful to make a few changes: - Blink time would be more useful than blink count - The confusing #ifdefs should be avoided - The time functions should support driver model - It would be best keyed off console_tstc() or some similar idle loop rather than a particular input driver (i8042 in this case) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* video: Drop DEV_EXT_VIDEO flagBin Meng2015-11-051-1/+0
| | | | | | DEV_EXT_VIDEO does not have any actual meaning, hence drop it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* video: Drop DEV_FLAGS_SYSTEM flagBin Meng2015-11-051-1/+1
| | | | | | DEV_FLAGS_SYSTEM does not have any actual meaning, hence drop it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* video: cfb_console: Allow VGA device to work without i8042 keyboardBin Meng2015-08-261-6/+5
| | | | | | | | | | | | | | So far if CONFIG_VGA_AS_SINGLE_DEVICE is not defined, the VGA device will try to initialize a keyboard device (for x86, it is i8042). But if i8042 controller initialization fails (eg: there is no keyboard connected to the PS/2 port), drv_video_init() just simply returns. This kills the opportunity of using a usb keyboard later with the vga console, as the vga initialization part is actually ok, only keyboard part fails. Change the code logic to allow this. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* cfbconsole: Add support for stride != widthHans de Goede2015-08-141-35/+37
| | | | | | | | | | | | | | cfbconsole currently assumes that the width and stride of the framebuffer are the same, in most places where stride matters it uses a VIDEO_LINE_LEN helper macro. This commit changes the few places not using VIDEO_LINE_LEN to also use VIDEO_LINE_LEN, and protects the default VIDEO_LINE_LEN with a #ifndef guard, allowing the boards config.h to override and, and thus support cases where stride != width. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Anatolij Gustschin <agust@denx.de>
* cfbconsole: Remove width argument from the logo functionsHans de Goede2015-08-141-13/+8
| | | | | | | | The passed in width is always VIDEO_COLS. This is a preparation patch for adding stride != width support to the cfbconsole code. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Anatolij Gustschin <agust@denx.de>
* Remove typedefs from bmp_layout.hSimon Glass2015-06-101-5/+5
| | | | | | | | | We try to avoid typedefs and these ones are easy enough to remove. Before changing this header in the next patch, remove the typedefs. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Joe Hershberger <joe.hershberger@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* x86: video: Allow keyboard presence to be controlled by device treeSimon Glass2015-04-161-8/+21
| | | | | | | | At present a VGA console assumes a keyboard unless a CONFIG option is set. This difference can be dealt with by a device tree option, allowing boards that are otherwise the same to use the same configuration. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: video: Add support for CONFIG_CONSOLE_SCROLL_LINESSimon Glass2015-01-231-9/+17
| | | | | | | | | | | | | Some machines are very slow to scroll their displays. To cope with this, support the CONFIG_CONSOLE_SCROLL_LINES option. Setting this to 5 allows the display to operate at an acceptable speed by scrolling 5 lines at a time. This same option is available for LCDs so when these systems are unified this code can be unified also. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* powerpc: mpc5xxx: remove Total5200 board supportMasahiro Yamada2015-01-231-3/+0
| | | | | | This board is still a non-generic board. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* ppc4xx: remove dead codeMasahiro Yamada2015-01-161-10/+0
| | | | | | | | | | | | Since commit 843125daebd7 (ppc4xx: remove HH405 board), CONFIG_HH405 is not defined. Since commit d52633047913 (ppc4xx: remove PMC405), CONFIG_PMC405 is not defined. Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
* linux/kernel.h: sync min, max, min3, max3 macros with LinuxMasahiro Yamada2014-11-231-9/+9
| | | | | | | | | | | | | | | | | | | | U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 macros synced with the kernel introducing type checks. Many of references of those macros must be fixed to suppress warnings. We have two options: - Use min, max, min3, max3 only when the arguments have the same type (or add casts to the arguments) - Use min_t/max_t instead with the appropriate type for the first argument Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [trini: Fixup arch/blackfin/lib/string.c] Signed-off-by: Tom Rini <trini@ti.com>
* video: speedup writing strings to fb consoleSoeren Moch2014-10-301-0/+9
| | | | | | | | | | | With enabled framebuffer console the printenv command can take several seconds to complete. This patch temporarily disables cache flush when writing strings to fb console. Then there is no noticable delay anymore. Tested with imx6 hdmi framebuffer. Signed-off-by: Soeren Moch <smoch@web.de> Acked-by: Stefano Babic <sbabic@denx.de>
* serial: make local functions staticJeroen Hofstee2014-10-251-2/+2
| | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* video: use __weakJeroen Hofstee2014-10-251-8/+2
| | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* stdio: Pass device pointer to stdio methodsSimon Glass2014-07-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | At present stdio device functions do not get any clue as to which stdio device is being acted on. Some implementations go to great lengths to work around this, such as defining a whole separate set of functions for each possible device. For driver model we need to associate a stdio_dev with a device. It doesn't seem possible to continue with this work-around approach. Instead, add a stdio_dev pointer to each of the stdio member functions. Note: The serial drivers have the same problem, but it is not strictly necessary to fix that to get driver model running. Also, if we convert serial over to driver model the problem will go away. Code size increases by 244 bytes for Thumb2 and 428 for PowerPC. 22: stdio: Pass device pointer to stdio methods arm: (for 2/2 boards) all +244.0 bss -4.0 text +248.0 powerpc: (for 1/1 boards) all +428.0 text +428.0 Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
* stdio: Remove redundant code around stdio_register() callsSimon Glass2014-07-231-2/+0
| | | | | | | | | | | | | There is no point in setting a structure's memory to NULL when it has already been zeroed with memset(). Also, there is no need to create a stub function for stdio to call - if the function is NULL it will not be called. This is a clean-up, with no change in functionality. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
* cfb_console: align fields in gzipped .bmp filesEric Nelson2014-03-101-2/+6
| | | | | | | | | | | | | | | | | | | .bmp files contain 32-bit integers aligned at offsets of +2, +6, et cetera within the bmp_header structure (see include/bmp_layout.h). Support for gzip-compressed .bmp files is present in the cfb_console display subsystem by uncompressing them prior to use. This patch forces the in-memory header to be aligned properly for these compressed images by extracting them to a 2-byte offset in the memory returned by malloc. Since malloc will always return a 4-byte aligned value, this forces the .bmp header fields to be naturally aligned on 4-byte addresses. Refer to these files for more details: doc/README.displaying-bmps Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
* video, cfb_console: make background and foreground color configurableHeiko Schocher2013-10-301-18/+20
| | | | | | | | make CONSOLE_BG_COL/CONSOLE_FG_COL configurable through board config file. Clear video screen in video_init(). Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Anatolij Gustschin <agust@denx.de>
* Coding Style cleanup: remove trailing white spaceWolfgang Denk2013-10-141-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* video: Encapsulate font in video_font_data.hMarek Vasut2013-08-121-1/+0
| | | | | | | | | | | | This patch moves all the font configuration values into video_font_data.h so they are all in the right place with the font. The video_font.h now only includes video_font_data.h and will allow us to select and include different font once more fonts are added. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> [agust: fixed build warning for mcc200] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: add an option to skip cfb console initHeiko Schocher2013-08-101-0/+15
| | | | | | | | | | | | This patch add an option to skip cfb console init for boards who want to show a logo, but not use the cfb console. This is needed for the siemens boards, which have a bmp bootlogo, but do not need the cfb console. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Anatolij Gustschin <agust@denx.de> [agust: use '__weak int board_cfb_skip(void)'] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: Fix cfb_console for 4-bit wide fontMarek Vasut2013-08-101-0/+21
| | | | | | | | | The cfb_console can't handle 4-bit wide font properly, since with 4-bit wide font, all 8 bits are drawn. Unbreak the video_drawchars() function to correctly render 4-bits only on such fonts. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* video: consolidate splash screen alignment codeAnatolij Gustschin2013-07-081-22/+2
| | | | | | | | | | Code for checking "splashpos" environment variable is duplicated in drivers, move it to the common function. Call this function also in the bmp display command to consider "splashpos" settings. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
* video: lcd: Add CONFIG_SPLASH_SCREEN_PREPARE support to CONFIG_VIDEORobert Winkler2013-07-011-2/+3
| | | | | | | | Create splash.c/h to put the function and any future common splash screen code in. Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2013-06-071-6/+9
|\
| * cfb_console: flush FB cache at end of public functionsEric Nelson2013-05-061-6/+9
| | | | | | | | | | | | | | | | Removed internal cache_flush operations and placed a flush of the entire frame-buffer at the end of each public function. Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | arm: mxs: Add MXS LCDIF driverMarek Vasut2013-05-061-0/+4
|/ | | | | | | | | | | | Add basic LCD driver for i.MX233 and i.MX28. This driver allows framebuffer console and framebuffer logo. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Anatolij Gustschin <agust@denx.de>
* video: Fix splash screen alignmentMatthias Weisser2013-03-211-7/+7
| | | | | | | | | | commit d484b52 "video: Skip bitmaps which do not fit into the screen in cfb_console" breaks splash screen alignment which is passed in as magic (BMP_ALIGN_CENTER) x/y coordinates. Moving the check after the alignment block fixes this. Signed-off-by: Matthias Weisser <weisserm@arcor.de> Acked-by: Simon Glass <sjg@chromium.org>
* video: Check for valid FB pointer before clearingDuncan Laurie2012-12-061-0/+2
| | | | | | | | | | | | This command will start erasing at memory address zero if there is not a valid framebuffer address that was found during video_init(). This is a common case with Chrome OS devices in normal mode when we do not execute the video option rom in coreboot. Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Skip bitmaps which do not fit into the screen in cfb_consoleVadim Bendebury2012-11-071-0/+7
| | | | | | | | | | | The cfb console driver is trying to prevent bitmaps to spill over the screen, but the calculations assume that at least part of the bitmap fits into the screen area. In reality there could be bitmap elements which are completely out of the screen area, they just need to be discarded. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Implement additional video API functions in cfb_consoleStefan Reinauer2012-11-071-0/+42
| | | | | | | | | Implement the new video API functions to provide access to screen size, etc. Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* cfb_console: Add support for some ANSI terminal escape codesPali Rohár2012-10-301-9/+319
| | | | | | | | | | Add optional support for some ANSI escape sequences to the cfb_console driver. Define CONFIG_CFB_CONSOLE_ANSI to enable cursor moving, color reverting and clearing the cfb console via ANSI escape codes. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: cfb_console: add function to plot the logo area blackBastian Ruppert2012-10-011-4/+42
| | | | | | | Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de> CC: Anatolij Gustschin <agust@denx.de> CC: Tom Rini <trini@ti.com> CC: Stefano Babic <sbabic@denx.de>
* video: cfb_console: logo can be positioned via the splashpos variableBastian Ruppert2012-10-011-25/+69
| | | | | | | | | | Extend the driver for placing the video/bmp logo as specified by "splashpos" environment variable. Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> CC: Stefano Babic <sbabic@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* video: Rename CONFIG_VIDEO_MX5Fabio Estevam2012-07-101-1/+1
| | | | | | Rename CONFIG_VIDEO_MX5 as this driver can also be used on mx6. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* video: cfb_console: flush dcache for frame buffer in DRAMAnatolij Gustschin2012-06-051-0/+35
| | | | | | | | | | | Data cache flushing is required for frame buffer in RAM to fix the distorted console text output. Currently this text distortion is observed with cfb on beagleboard and N900 when running with data cache enabled. Reported-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* cfb_console: Ignore bell characterPali Rohár2012-06-051-0/+3
| | | | Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* cfb_console: Add console_clear_line functionPali Rohár2012-06-041-13/+36
| | | | | | | console_clear_line() clears part of specified line or the full line. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* cfb_console: Fix function console_backPali Rohár2012-06-041-2/+0
| | | | | | | | | | | * Do not disable and enable the cursor again. console_back() is called only from video_putc() which already turns the cursor off at the beginning and turns it on at the end, so there is no need to change the cursor in console_back(). Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: cfb_console: fix build warningsAnatolij Gustschin2011-12-071-21/+17
| | | | | | | | | | | Fix: cfb_console.c:371: warning: 'cursor_state' defined but not used cfb_console.c:372: warning: 'old_col' defined but not used cfb_console.c:373: warning: 'old_row' defined but not used cfb_console.c:435: warning: 'video_invertchar' defined but not used Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Wolfgang Denk <wd@denx.de>
* video: cfb_console: Make the software cursor non-destructiveGabe Black2011-12-051-56/+53
| | | | | | | | | | | | | When printing the string "\r\n" to the framebuffer console, the first character of the current line was being replaced with a space. The "boot" prompt would become the "oot" prompt. This change makes the cursor non-destructive so that no matter where it goes on its way to where it's supposed to be, the end result is that the cursor is where it's supposed to be with the other text preserved. Signed-off-by: Gabe Black <gabeblack@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* CFB: Fix font rendering on mx5 framebufferMarek Vasut2011-11-291-1/+1
| | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* font: split font data from video_font.hChe-Liang Chiou2011-11-151-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-151-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>
* drivers/video/cfb_console.c:Fix GCC 4.6 build warningWolfgang Denk2011-11-071-1/+3
| | | | | | | | | | | Silence this warning: cfb_console.c: In function 'video_logo': cfb_console.c:1563:18: warning: variable 'y_off' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Acked-by: Anatolij Gustschin <agust@denx.de>
* GCC4.6: Squash warning in cfb_console.cMarek Vasut2011-10-271-1/+1
| | | | | | | | | | | | | cfb_console.c: In function 'video_display_bitmap': cfb_console.c:1148: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int' cfb_console.c:1148: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org>
OpenPOWER on IntegriCloud