aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/cfb_console.c
Commit message (Collapse)AuthorAgeFilesLines
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* video: cfb_console: simplify logical constraintHeinrich Schuchardt2018-03-191-1/+1
| | | | | | (A || !A && B) == (A || B) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* video: Support multiple lines version string displayPeng Fan2018-01-031-7/+23
| | | | | | | | | | | | The calculation of left space for version string is not correct, should use VIDEO_COLS not VIDEO_LINE_LEN / 2, otherwise we will get larger space than actual have and cause string to overlay logo picture. Also current version string display only supports two lines words at max. This also causes overlay when the LCD pixel column size is not enough. Signed-off-by: Peng Fan <peng.fan@nxp.com> Tested-by: Anatolij Gustschin <agust@denx.de>
* video: add config option to skip framebuffer clearRob Clark2017-09-121-1/+2
| | | | | | | | The use-case is that the thing that loaded u-boot already put a splash image on screen. And we want to preserve that until grub boot menu takes over. Signed-off-by: Rob Clark <robdclark@gmail.com>
* env: Rename getenv/_f() to env_get()Simon Glass2017-08-161-1/+1
| | | | | | | | | | | 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 <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Drop the ct69000 driverBin Meng2017-08-071-10/+0
| | | | | | This is not used in U-Boot. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* avr32: Retire AVR32 for goodAndy Shevchenko2017-07-061-1/+1
| | | | | | | | | | | | | | AVR32 is gone. It's already more than two years for no support in Buildroot, even longer there is no support in GCC (last version is heavily patched 4.2.4). Linux kernel v4.12 got rid of it (and v4.11 didn't build successfully). There is no good point to keep this support in U-Boot either. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* video: cfb_console: fix 32-bit display on 64-bit architecturesAndre Przywara2017-03-071-5/+5
| | | | | | | | | | | "unsigned long" is a lousy data type when it comes to match peripheral hardware registers with a fixed size. Just do the obvious and match a 32-bit display format with an "u32" data type for casting. This fixes the logo display on 64-bit architectures, which produced a black line on the right side of the logo with non-black backgrounds. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
* drivers/video/cfb_console.c: Correct "COFNIG_NDS32" typo.Robert P. J. Day2017-02-031-1/+1
| | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
* video: cfb_console: fix hang if splashimage file is missingAnatolij Gustschin2017-01-131-2/+4
| | | | | | | | If the splash file doesn't exist, the booting stops bricking the boards. Check return value of prepare function and stop decoding the logo data if splash prepare stage failed. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: Move video_get_info_str() prototype to a header fileSimon Glass2016-10-231-17/+8
| | | | | | | | This should be defined in a header file so that arguments are checked. Move it to video.h. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_VIDEO_SW_CURSOR to KconfigSimon Glass2016-10-231-6/+0
| | | | | | | | | | This converts the following to Kconfig: CONFIG_VIDEO_SW_CURSOR Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Re-convert, find all the cases where this is off] Signed-off-by: Tom Rini <trini@konsulko.com>
* video: Drop CONFIG_VIDEO_HW_CURSORSimon Glass2016-10-231-32/+1
| | | | | | | This is not used in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_VGA_AS_SINGLE_DEVICE to KconfigSimon Glass2016-10-231-6/+0
| | | | | | | | | | This converts the following to Kconfig: CONFIG_VGA_AS_SINGLE_DEVICE Once we migrate to driver model for video, we should be able to drop this option. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Drop the sed13806 driverSimon Glass2016-10-231-9/+0
| | | | | | | This is not used in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* video: Drop the s3c-fb driverSimon Glass2016-10-231-1/+1
| | | | | | | | This is not used in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Minkyu Kang <mk7.kang@samsung.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* video: Drop the smiLynxEM driverSimon Glass2016-10-231-13/+0
| | | | | | | This is not used in U-Boot anymore. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_SYS_CONSOLE_BG_COL et al to KconfigSimon Glass2016-10-231-48/+50
| | | | | | | | | This converts the following to Kconfig: CONFIG_SYS_CONSOLE_BG_COL CONFIG_SYS_CONSOLE_FG_COL Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* video: allow version string to be optional when using LOGOTim Harvey2016-07-111-1/+3
| | | | | | | The CONFIG_HIDE_LOGO_VERSION config can be used to disable putting the U-Boot version string on top of the logo. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* 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>