Commit Graph

94 Commits

Author SHA1 Message Date
Fabio Estevam 695af9abc6 video: Rename CONFIG_VIDEO_MX5
Rename CONFIG_VIDEO_MX5 as this driver can also be used on mx6.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-07-10 11:35:38 +02:00
Anatolij Gustschin bfd4be803b video: cfb_console: flush dcache for frame buffer in DRAM
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>
2012-06-05 11:15:36 +02:00
Pali Rohár 24fe06cc6f cfb_console: Ignore bell character
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
2012-06-05 09:24:10 +02:00
Pali Rohár 90f60a81da cfb_console: Add console_clear_line function
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>
2012-06-04 22:43:31 +02:00
Pali Rohár 04bbe69990 cfb_console: Fix function console_back
* 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>
2012-06-04 22:42:02 +02:00
Anatolij Gustschin a45adde9f7 video: cfb_console: fix build warnings
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>
2011-12-07 21:32:19 +01:00
Gabe Black 03d31fcf4c video: cfb_console: Make the software cursor non-destructive
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>
2011-12-05 22:05:24 +01:00
Marek Vasut 5fb1a6f9c1 CFB: Fix font rendering on mx5 framebuffer
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2011-11-29 15:43:36 +01:00
Che-Liang Chiou d3983ee853 font: split font data from video_font.h
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-15 23:58:26 +01:00
Che-Liang Chiou c270730f58 tools: logo: split bmp arrays from bmp_logo.h
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-15 23:58:26 +01:00
Wolfgang Denk a9a62af1f9 drivers/video/cfb_console.c:Fix GCC 4.6 build warning
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>
2011-11-07 22:11:38 +01:00
Marek Vasut 68da5b1911 GCC4.6: Squash warning in cfb_console.c
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>
2011-10-27 23:54:04 +02:00
Helmut Raiger 62a22dca32 video: Moving mx3fb.c to CONFIG_VIDEO
mx3fb.c was based on CONFIG_LCD and is moved by this patch to
CONFIG_VIDEO, which has greater freedom in selecting videomodes
even at runtime.

This renders the accumulating list of display defines
(CONFIG_DISPLAY_VBEST..., CONFIG_DISPLAY_C057...) obsolete as
these may be setup through env variables:

uboot> setenv mydisplay 'video=ctfb240,y:320,depth:16,mode:0,pclk:185925,
	le:9,ri:17,up:7,lo:10,hs:1,vs:1,sync:100663296,vmode:0'
uboot> setenv videomode ${mydisplay}

This commit also fixes the board config files for qong and
imx31_phycore boards as needed. The videomode settings of
previously supported displays are added to CONFIG_EXTRA_ENV_SETTINGS
now. CONFIG_SYS_MALLOC_LEN for imx31_phycore board is increased
to make the frame buffer allocation working with the changed
driver.

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2011-10-13 10:41:36 +02:00
Wolfgang Denk 5791293986 cfb_console.c: checkpatch cleanup
Fix the following:

ERROR: do not initialise statics to 0 or NULL
ERROR: do not use assignment in if condition

Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-08-01 15:03:07 +02:00
Wolfgang Denk 72c65f6f6d cfb_console.c: drop custom PRINTD() and use debug() instead
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-08-01 14:58:55 +02:00
Wolfgang Denk 64e40d72ea Cosmetic: reformat drivers/video/cfb_console.c
Run cfb_console.c through indent and manually fix some of he
deficiencies of the automatic line breaking.

Fix multiline comments, excessive line spacing and such.

No changes to code done.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-08-01 14:58:41 +02:00
Andreas Bießmann ce0f709bcd cfb_console: fix build breakage
Commit 09c2e90c11 "unify version_string"
introduced a build breakage in cfb_console.c

---8<---
cfb_console.c:1497: warning: format '%s' expects type 'char *', but
argument 3 has type 'const char (*)[]'
--->8---

Signed-off-by: Andreas Biemann <andreas.devel@googlemail.com>
2011-07-29 11:28:26 +02:00
Andreas Bießmann 09c2e90c11 unify version_string
This patch removes the architecture specific implementation of
version_string where possible. Some architectures use a special place
and therefore we provide U_BOOT_VERSION_STRING definition and a common
weak symbol version_string.

Signed-off-by: Andreas Biemann <andreas.devel@googlemail.com>
CC: Mike Frysinger <vapier@gentoo.org>
CC: Peter Pan <pppeterpppan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-07-28 17:22:53 +02:00
Anatolij Gustschin 74446b63dd cfb_console: fix RLE bitmap drawing code
There seems to be tools producing incorrect 'end of bitmap data'
markers '0100' in a RLE bitmap. Drawing such bitmaps can result
in overwriting memory above the frame buffer. E.g. on MPC5121e
based boards this memory can contain U-Boot environment.

We may not rely on the correct end of bitmap data marker 0001
only, but also have to check whether we are going to draw a
valid frame buffer scan line.

The patch provides a fix by maintaining a pixel counter
which is incremented by the amount of pixels we are going
to draw. If the counter exceeds frame buffer pixels limit
we stop the drawing with the error message.

Reported-by: Michael Weiss <michael.weiss@ifm.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>
2011-04-28 21:30:46 +02:00
Wolfgang Denk 2e6e1772c0 Merge branch 'next' of /home/wd/git/u-boot/next
Conflicts:
	include/ppc4xx.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-28 23:30:47 +02:00
Timur Tabi 68f6618bcd video: cfb_console: add support for 4bpp bitmaps with GDF_32BIT_X888RGB
Add support for 4bpp bitmaps, currently only for GDF_32BIT_X888RGB
frame buffer format.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-09-21 22:44:59 +02:00
Timur Tabi 6561863678 video: cfb_console: fix definition and usage of CURSOR_xxx macros
The CURSOR_ON, CURSOR_OFF, and CURSOR_SET macros are defined incorrectly.  If
cursor support is disabled, then these macros are defined to nothing, but
then they are used like this:

	if (console_col < CONSOLE_COLS)
		CURSOR_OFF
	console_row++;

which was compiled like this:

	if (console_col < CONSOLE_COLS)
		console_row++;

This is obviously not what was intended.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
2010-09-16 00:44:06 +02:00
Anatolij Gustschin 7c050f818b video: cleanup comments in cfb_console.c and video_fb.h
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-07-17 00:05:14 +02:00
Anatolij Gustschin 1054382007 video: cfb_console: add weak default video_set_lut()
Do not enforce drivers to provide empty video_set_lut()
if they do not implement indexed color (8 bpp) frame
buffer support. Add default function to the cfb_console
driver and remove empty video_set_lut() functions.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-06-14 12:28:28 +02:00
Anatolij Gustschin d5011762f5 video: cfb_console.c: add support for RLE8 bitmaps
Allow displaying 8-bit RLE BMP images.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-04-08 15:25:43 +02:00
Matthias Weisser be129aa718 video: Fix console display when splashscreen is used
If a splashscreen is used the console scrolling used the
scroll size as needed when a logo was displayed. This
patch sets the scroll size to the whole screen if
a splashscreen is shown.

Signed-off-by: Matthias Weisser <matthias.weisser@graf-syteco.de>
2010-03-13 16:42:25 +01:00
Wolfgang Wegner 87d93a1ba2 move prototypes for gunzip() and zunzip() to common.h
Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus
repeated in every file using it. This patch moves the prototypes to
common.h and removes all prototypes distributed anywhere else.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
2009-12-21 21:39:59 +01:00
Wolfgang Grandegger 229b6dce67 video: mb862xx: add option VIDEO_FB_16BPP_WORD_SWAP for IPEK01
In 16 bpp mode, the new IPEK01 board only requires swapping of D16 words
for D32 accesses due to the diffferent connecting to the GDC bus. This
patch introduces the configuration option VIDEO_FB_16BPP_WORD_SWAP,
which should be set for all board using the mb862xx in 16 bpp mode. For
the IPEK01, VIDEO_FB_16BPP_PIXEL_SWAP should not be set.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
2009-10-31 12:17:40 +01:00
Anatolij Gustschin 5d16ca8710 video: mb862xx: add option CONFIG_VIDEO_MB862xx_ACCEL for 32bpp mode
The new IPEK01 board can use the 32 bpp mode for the Lime graphics
controller. For this mode, video accelaration does not work. This patch
makes the accelaration configurable via CONFIG_VIDEO_MB862xx_ACCEL,
which is enabled for the lwmon5 and the socrates board for backward
compatibility.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Wolfgang Grandegger <wg@denx.de>
2009-10-31 12:16:29 +01:00
Jean-Christophe PLAGNIOL-VILLARD 52cb4d4fb3 stdio/device: rework function naming convention
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-18 00:27:46 +02:00
Matthias Weisser 1ca298ced0 Added support for splash screen positioning
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-07-17 15:23:41 +02:00
Wolfgang Denk 6cc7ba9ed4 video: Add an option to skip video initialization
This patch adds an option to skip the video initialization on for all
video drivers. This is needed for the CPCI750 which can be built as
CPCI host and adapter/target board. And the adapter board can't
access the video cards located on the CompactPCI bus.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>

Rebased against simplifying patch.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:39:51 +02:00
Wolfgang Denk f62f64692f drv_video_init(): simplify logic
Simplify nesting of drv_video_init() and use a consistent way of
indicating failure / success. Before, it took me some time to realize
which of the returns was due to an error condition and which of them
indicated success.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
2009-06-12 20:39:51 +02:00
Anatolij Gustschin 3dcbe628d6 video: fix bug in cfb_console.c code
Fix bug in drawing long version/info strings:
U-Boot version string like
"U-Boot 2009.03-05647-g7c51e06 (Apr 23 2009 - 12:40:00) MPC83XX"
is long and doesn't wrap around correctly while drawing
beside the logo. Such long strings partially overwrite
the logo. This patch is an attempt to fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-04-28 10:55:13 +02:00
Jean-Christophe PLAGNIOL-VILLARD 6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
Andrew Dyer cc347801ad clean up some #if !defined() in drivers/video/cfb_console.c
rearrange some #if !defined() / #else / #endif statements to remove
the negative logic.

Signed-off-by: Andrew Dyer <adyer@righthandtech.com>
2008-09-07 00:16:28 +02:00
Michal Simek eb59ea45ab video: Clean drivers/video/Makefile
Signed-off-by: Michal Simek <monstr@monstr.eu>
2008-08-18 23:36:17 +02:00
Anatolij Gustschin e84d568fa2 video: fix bug in cfb_console code
FILL_15BIT_555RGB macro extension for pixel swapping
by commit bed53753dd
introduced a bug in cfb_console:

Bitmaps with odd-numbered width won't be rendered
correctly and even U-Boot crashes are observed on
some platforms while repeated rendering of such
bitmaps with "bmp display". Also if a bitmap is
rendered to an odd-numbered x starting position,
the same problem occurs. This patch is an attempt
to fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-08-11 00:24:58 +02:00
Anatolij Gustschin d9015f6a50 video: fix bug in logo_plot
If logo_plot() should ever be called with x starting
position other than zero and for pixel depths greater
than 8bpp, logo colors distortion will be observed.
This patch fixes the issue.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-08-11 00:24:04 +02:00
Matthias Fuchs a49e0d177a video: Add missing free for logo memory
This patch adds two missing free()s.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-21 14:05:59 +02:00
Anatolij Gustschin bed53753dd Add Fujitsu CoralP/Lime video driver
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
2008-01-11 16:05:36 +01:00
Anatolij Gustschin 20c450ef61 Fix video console newline and carriage return handling
Lines of the lenght CONSOLE_COLS or greater than CONSOLE_COLS
are not displayed correctly. This is an attempt to fix
this issue. Also add carriage return handling.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
2008-01-11 16:04:46 +01:00
Marcel Ziswiler 7817cb2083 fix comments with new drivers organization
Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
2008-01-09 21:48:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD 352d259130 drivers/video : move video drivers to drivers/video
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2007-11-25 18:35:11 +01:00