Commit Graph

610 Commits

Author SHA1 Message Date
Tom Rini
3fea953698 Merge branch 'master' of git://git.denx.de/u-boot-video 2017-04-14 22:05:17 -04:00
eric.gao@rock-chips.com
7682736c89 video: Fix crash when scroll screen
After enabling log printing to lcd, when the screen starts
scrolling, system crashes. Log is shown as bellow:

    "Synchronous Abort" handler, esr 0x96000045
    "Synchronous Abort" handler, esr 0x96000045

Checking the source code, we found that the variable "pixels"
gets a wrong value:

    int pixels = VIDEO_FONT_HEIGHT * vid_priv->line_length;

"pixels" here means the value of pixels for a character, rather
than the bytes for a character. So the variable "pixels" is 4
times bigger than it's exact value, which will cause the memory
overflow when the cpu runs the following code:

    for (i = 0; i < pixels; i++)
        *dst++ = clr; <<----

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
2017-04-14 16:11:38 +02:00
Songjun Wu
7927831e21 at91: video: Support driver-model for the HLCD driver
Add driver-model support to this driver.

Signed-off-by: Songjun Wu <songjun.wu@microchip.com>
2017-04-14 14:51:35 +02:00
Stefan Agner
7a2d533eec video: fsl_dcu_fb: add additional modes for DCU
Add common widescreen modes 800x480 and 1024x600.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Reviewed-by: Alison Wang <alison.wang@nxp.com>
2017-04-14 13:59:07 +02:00
Stefan Agner
7ce92a554a video: fsl_dcu_fb: Fix DCU_MODE_BLEND_ITER setting
DCU_LAYER_MAX_NUM is currently used for DCU_MODE_BLEND_ITER and it
actually overflows the maximum value of BLEND_ITER for Vybrid and
LS102XA. Fix this by using a default value of 2.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2017-04-14 13:56:24 +02:00
Stefan Agner
32f26f56b3 video: fsl_dcu_fb: Enable pixel clock after initialization
When enabling the DCU and pixel clock, the test mode is activated
since this is the reset configuration. The test mode immediately
shows a red screen on a LCD. A moment later, the DCU gets
initialized properly.

This patch enables the pixel clock after initialization of the DCU
control register. This avoids this initial flicker on LCD screens.

While at it change the polarity of pixel clock to display samples
data on the rising edge.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Reviewed-by: Alison Wang <alison.wang@nxp.com>
2017-04-14 13:52:56 +02:00
Stefan Agner
77810e638e video: fsl_dcu_fb: fix framebuffer to the end of memory
Fix the framebuffer location to the very end of the available memory.
This allows to remove the area from available memory for the kernel,
which in turn allows to display the splash screen through the Linux
kernel boot process.

Ideas has been taken from the sunxi display driver, e.g.
20779ec3a5 ("sunxi: video: Dynamically reserve framebuffer memory")

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2017-04-14 13:50:41 +02:00
Sanchayan Maity
b215fb3f34 Convert CONFIG_FSL_DCU_FB to Kconfig
Rename CONFIG_FSL_DCU_FB to CONFIG_VIDEO_FSL_DCU_FB
and convert it to Kconfig.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Alison Wang <alison.wang@nxp.com>
2017-04-14 13:37:35 +02:00
Tom Rini
1622559066 Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Drop CONFIG_STACKSIZE from include/configs/imx6_logic.h

Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-13 11:19:00 -04:00
Marek Vasut
fcea480d1d ARM: mxs: Rename M28EVK
The board is now manufactured by Aries Embedded GmbH , rename it.

Signed-off-by: Marek Vasut <marex@denx.de>
2017-04-05 18:12:04 +02:00
Jernej Skrabec
cc232a9d07 rockchip: video: Split out HDMI controller code
Designware HDMI controller and phy are used in other SoCs as well. Split
out platform independent code.

DW HDMI has 8 bit registers but they can be represented as 32 bit
registers as well. Add support to select access mode.

EDID reading code use reading by blocks which is not supported by other
SoCs in general. Make it more general using byte by byte approach, which
is also used in Linux driver.

Finally, not all DW HDMI controllers are accompanied with DW HDMI phy.
Support custom phys by making controller code independent from phy code.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Tested-by: Nickey Yang <nickey.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-04-04 20:01:57 -06:00
Jernej Skrabec
520c174b35 rockchip: video: Remove CSC initialization (HDMI)
Despite the comment in the code, CSC unit is never used. According to
the only public description of DW HDMI controller (i.MX6 manual), CSC
unit is bypassed in MC_FLOWCTRL register and then actually powered
down in MC_CLKDIS register.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-16 16:03:47 -06:00
Jernej Skrabec
a0a2774aeb rockchip: video: Fix HDMI audio clocks
Function hdmi_lookup_n_cts() is feed with clock in Hz, which gets
compared with clocks in kHz. Fix that by converting all clocks to Hz.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-16 16:03:47 -06:00
Andre Przywara
1d4ed26faf video: cfb_console: fix 32-bit display on 64-bit architectures
"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>
2017-03-07 21:18:23 +01:00
Nickey Yang Nickey Yang
94412745cd rockchip: video: fix 83500000 clock mistake in rockchip HDMI
There is one "0" too many in 83500000 mpixelclock in rockchip_mpll_cfg[].
fix it.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2017-02-27 16:10:45 +01:00
Fabio Estevam
b24cf8540a video: mxsfb: Fix reset hang when videomode variable is not present
Currently the system hangs when the 'videomode' variable is not present
and a reset command is issued:

=> setenv videomode
=> saveenv
=> reset

(Board hangs)

lcdif_power_down() assumes that the LCDIF controller has been properly
configured and enabled, which may not be true.

To fix this issue check whether panel.frameAdrs has been initialized and
in case it has not been initialized, do not continue with the LCDIF
powerdown sequence.

Tested on a imx7dsabresd board.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
2017-02-22 21:47:59 +01:00
Tom Rini
f1cc97764b Merge branch 'master' of git://git.denx.de/u-boot-video 2017-02-09 14:54:09 -05:00
Simon Glass
e160f7d430 dm: core: Replace of_offset with accessor
At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree, which uses a node pointer instead, refactor existing code to
access this field through an inline function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08 06:12:14 -07:00
Simon Glass
c7ccb2c032 x86: ivybridge: Fix types for 64-bit compilation
Fix a few types that causes warnings on 64-bit machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Simon Glass
05af050e9f x86: ivybridge: Declare global data where it is used
Some files are missing this declaration. Add it to avoid build errors when
we actually need the declaration.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-02-06 11:38:46 +08:00
Robert P. J. Day
9b23bafb4f drivers/video/cfb_console.c: Correct "COFNIG_NDS32" typo.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2017-02-03 13:27:23 +01:00
Tom Rini
f253f2933b Merge branch 'master' of git://git.denx.de/u-boot-video 2017-01-16 20:23:14 -05:00
Anatolij Gustschin
b4fc6f2214 video: cfb_console: fix hang if splashimage file is missing
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>
2017-01-13 20:20:35 +01:00
Nickey Yang Nickey Yang
0fc41e551e rockchip: video: fix mpixelclock in rockchip HDMI
Correct mpixelclock errors in rockchip_phy_config[] and rockchip_mpll_cfg[].

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2017-01-11 20:23:50 -07:00
Marcel Ziswiler
d5c453abef video: tegra: fix spelling in comment
Get rid of spurious 'are' in the comment.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2017-01-03 10:34:13 -07:00
Jagan Teki
7db7455b53 video: Kconfig: Add VIDEO_IPV3 entry
Added kconfig entry for CONFIG_VIDEO_IPV3 driver.

Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2016-12-16 17:15:27 +01:00
Alexander Graf
8b82dd9add bcm2835 video: Map frame buffer as 32bpp
To enable working efifb support, let's map the frame buffer as 32bpp
instead of 16bpp.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
2016-11-28 20:15:20 -05:00
Simon Glass
095e6c1f2d rockchip: video: Avoid using u8 in the HDMI driver
It makes not sense using u8 to hold a value on a 32-bit or 64-bit machine.
It can only bloat the code by forcing the compiler to mask the value.
Change it to uint.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-25 17:59:32 -07:00
Simon Glass
987a404aa1 rockchip: video: Check for device in use
Check whether a display device is in use before using it. Add a comment as
to why two displays cannot currently be used at the same time.

This allows us to remove the device-tree change that disables vopb on
jerry.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-25 17:59:31 -07:00
Simon Glass
1b68283b64 video: Track whether a display is in use
Mark a display as in use when display_enable() is called. This can avoid
a display being used by multiple video-output devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-25 17:59:31 -07:00
Simon Glass
7981394e55 video: Use cache-alignment in video_sync()
Sometimes the frame buffer is not a multiple of the cache line size.
Adjust the cache-flushing code to avoid cache warnings/errors in this
case.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-25 17:59:31 -07:00
Simon Glass
9ed6826060 rockchip: video: Correct VOP clock selection
This code incorrectly uses the oscillator. It should use the clock
selected in the device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 135aa95 (clk: convert API to match reset/mailbox style)
2016-11-25 17:59:30 -07:00
Simon Glass
e4ab3d712a rockchip: video: Correct HDMI data source selection
This code currently always selects the second source. It only worked
because both sources are set up.

With the change to only init video devices that are present in the stdout
environment variable, this fails. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-25 17:59:30 -07:00
Stefan Roese
22bb1a7a1b video: bmp: Fix compilation errors with CONFIG_BMP_xxBPP enabled
Compiling the 'bmp' command with DM and having one of the following macros
enabled:

CONFIG_BMP_16BPP, CONFIG_BMP_24BPP ONFIG_BMP_32BPP

generates this error:

drivers/video/video_bmp.c: In function ‘video_bmp_display’:
drivers/video/video_bmp.c:315:22: error: ‘lcd_line_length’ undeclared (first use in this function)
    fb -= width * 2 + lcd_line_length;
                          ^

This patch moves to using the correct variable instead and enables the
'bmp' command for DM again.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
2016-11-13 15:54:38 -05:00
Masahiro Yamada
6e67f176bb Fix codying style broken by recent libfdt sync
Commit b02e4044ff ("libfdt: Bring in upstream stringlist
functions") broke codying style in some places especially
by inserting an extra whitespace before fdt_stringlist_count().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-10-24 08:04:42 -04:00
Simon Glass
b87ca80b9b Convert CONFIG_CONSOLE_SCROLL_LINES to Kconfig
This converts the following to Kconfig:
   CONFIG_CONSOLE_SCROLL_LINES

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-23 18:33:57 -04:00
Simon Glass
0a6eac842e video: Move video_get_info_str() prototype to a header file
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>
2016-10-23 18:33:54 -04:00
Simon Glass
fbda683292 Convert CONFIG_CONSOLE_EXTRA_INFO to Kconfig
This converts the following to Kconfig:
   CONFIG_CONSOLE_EXTRA_INFO

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-23 18:33:54 -04:00
Simon Glass
0872d443aa Convert CONFIG_VIDEO_SW_CURSOR to Kconfig
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>
2016-10-23 18:33:52 -04:00
Simon Glass
a4206575c8 video: Drop CONFIG_VIDEO_HW_CURSOR
This is not used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-23 18:33:48 -04:00
Simon Glass
1e1a0fb23d Convert CONFIG_VGA_AS_SINGLE_DEVICE to Kconfig
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>
2016-10-23 18:33:48 -04:00
Simon Glass
ac8a32ff1d video: Drop the sed13806 driver
This is not used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-23 18:33:43 -04:00
Simon Glass
c370d382ce video: Drop the s3c-fb driver
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>
2016-10-23 18:33:42 -04:00
Simon Glass
14438e12ac video: Drop the imx25lcdc driver
This is not used anywhere in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-23 18:33:42 -04:00
Simon Glass
9909aebc9d video: Drop the smiLynxEM driver
This is not used in U-Boot anymore.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-23 18:33:41 -04:00
Simon Glass
002f967c50 Convert CONFIG_SYS_CONSOLE_BG_COL et al to Kconfig
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>
2016-10-23 18:33:41 -04:00
Simon Glass
cfa307f839 Convert CONFIG_VIDEO_CT69000 to Kconfig
This converts the following to Kconfig:
   CONFIG_VIDEO_CT69000

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-23 18:33:40 -04:00
Simon Glass
c6745195be Convert CONFIG_CFB_CONSOLE_ANSI to Kconfig
This converts the following to Kconfig:
   CONFIG_CFB_CONSOLE_ANSI

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-23 18:33:38 -04:00
Simon Glass
bdba2b3a88 Convert CONFIG_CFB_CONSOLE to Kconfig
This converts the following to Kconfig:
   CONFIG_CFB_CONSOLE

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-10-23 18:33:37 -04:00
Simon Glass
f8b19a889e Convert CONFIG_LCD to Kconfig
This converts the following to Kconfig:
   CONFIG_LCD

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
2016-10-23 18:33:22 -04:00