summaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)AuthorFilesLines
2018-03-19video: stm32: stm32_ltdc: set the blending factoryannick fertre1-6/+35
Set the blending factor regarding the pixel format Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19video: stm32: stm32_ltdc: missing set of line interrupt positionyannick fertre1-0/+2
Set LIPCR (line interrupt position conf) register with line length. Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19video: stm32: stm32_ltdc: set rate of the pixel clockyannick fertre1-23/+29
pxclk is useless to set pixel clock. Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19video: stm32: stm32_ltdc: update file header & footeryannick fertre1-9/+8
Modified copyright & driver name. Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19video: stm32: stm32_ltdc: add resetyannick fertre1-0/+11
Add reset of LTDC display controller. Signed-off-by: yannick fertre <yannick.fertre@st.com>
2018-03-19video: exynos: remove redundant assignmentsHeinrich Schuchardt1-6/+6
No need to initialize variables if the next usage is an assignment. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-19video, da8xx-fb: fix time out in wait_for_event()Heinrich Schuchardt1-2/+3
If an event does not occur the current coding stays in an endless loop. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-19video: stb_truetype: simplify expressionHeinrich Schuchardt1-1/+1
Eliminate (x2 - x2) which is always zero. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-19video: cfb_console: simplify logical constraintHeinrich Schuchardt1-1/+1
(A || !A && B) == (A || B) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-09sunxi: video: mark framebuffer as EFI reserved memoryHeinrich Schuchardt1-0/+8
Inform the EFI subsystem that the framebuffer memory is reserved. Without the patch the AllocatePool boot service allocates memory from the framebuffer which will will be overwritten by screen output. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-06video: indicate code page of bitmap fontsHeinrich Schuchardt1-1/+1
Add comments clarifying that the bitmap fonts support code page 437. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-03-06pwm-backlight: make power-supply as optionKever Yang1-12/+12
Some pwm backlight may not need 'power-supply', let's make it as option in pwm-backlight driver. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-03-06dm: video: support increased intensity (bold)Heinrich Schuchardt2-7/+30
Support special rendition code 0 - reset attributes. Support special rendition code 1 - increased intensity (bold). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-03-06dm: video: use constants to refer to colorsHeinrich Schuchardt2-29/+45
Use constants to refer to colors. Adjust initialization of foreground and background color to avoid setting reserved bits. Consistently u32 instead of unsigned for color bit mask. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-03-06dm: video: correctly clean background in 16bit modeHeinrich Schuchardt1-2/+14
In 16 bit mode we have to copy two bytes per pixels repeatedly and not four. Otherwise we will see a striped pattern. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-03-06dm: video: show correct colors in graphical consoleHeinrich Schuchardt1-7/+6
Get RGB sequence in pixels right (swap blue and red). Do not set reserved bits. qemu-system-i386 -display sdl -vga virtio and qemu-system-i386 -display sdl -vga cirrus now display the similar colors (highlighting still missing) as qemu-system-i386 -nographic Testing is possible via setenv efi_selftest test output bootefi selftest Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-03-05libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>Masahiro Yamada4-4/+4
Thomas reported U-Boot failed to build host tools if libfdt-devel package is installed because tools include libfdt headers from /usr/include/ instead of using internal ones. This commit moves the header code: include/libfdt.h -> include/linux/libfdt.h include/libfdt_env.h -> include/linux/libfdt_env.h and replaces include directives: #include <libfdt.h> -> #include <linux/libfdt.h> #include <libfdt_env.h> -> #include <linux/libfdt_env.h> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-02-23rockchip: video: rk_vop: migrate to livetreePhilipp Tomsich1-28/+57
This migrates rk_vop (the shared functions used by multiple VOP mini-drivers) to be compatible with a live tree. Unfortunately, there's (i) a lot of tree traversal needed for a VOP (as each active VOP vnode references back to the endpoints in the encoders and vice versa) to configure the connection between VOPs and encoders; (ii) the DTS binding is not too sane and one needs to walk a node's parents (the original code just assumed that the device would live 3 levels above the property linked through a phandle) until a UCLASS_DISPLAY device can be found. As part of the migration, the code for finding the enclosing display device has been changed to not assume a specific depth of nesting (i.e. we walk until we reach the root or find a matching device) and to use the newly introduced (in the same series) ofnode_get_parent() function. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-02-23rockchip: video: rk_hdmi: migrate to livetreePhilipp Tomsich1-1/+1
The rk_hdmi (shared functions for multiple HDMI mini-drivers) has been using devfdt_get_addr() to read the HDMI controller's IO base address. This will cause a failure with a live tree. This changes the driver to use dev_read_addr() which is safe both for flat trees and live trees. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-02-14video: ivybridge_igd: Fix compiler warningBin Meng1-56/+0
Fix build warning in drivers/video/ivybridge_igd.c with gcc 7.3.0: warning: 'ivb_pm_gt2' defined but not used [-Wunused-const-variable=] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-01-26Merge git://git.denx.de/u-boot-sunxiTom Rini2-0/+4
2018-01-26video: bpp16: Disable by default on sunXiMaxime Ripard1-0/+1
The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Reviewed-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-01-26video: bpp8: Disable by default on sunXiMaxime Ripard1-0/+1
The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Reviewed-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-01-26Merge git://git.denx.de/u-boot-spiTom Rini1-32/+32
2018-01-24wait_bit: use wait_for_bit_le32 and remove wait_for_bitÁlvaro Fernández Rojas1-32/+32
wait_for_bit callers use the 32 bit LE version Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-01-22sunxi: Fix display timing flagsGiulio Benetti1-0/+2
flags member of struct timing was not initialized, this took to unpredictable behaviour of display flags, such DISPLAY_FLAGS_HSYNC_HIGH instead of _LOW etc. Init timing->flags = 0 Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-01-11am335x-fb: setup display PLLHannes Schmelzer2-4/+52
The LCDC IP-core an be feed from several clock sources, one of those is a dedicated DPLL for generating a dividable base-clock for this IP-core. The TRM specifies the maximum input frequency for the LCCD with 200 MHz, so we must not exceed this value with the PLL frequency (which can lock much higher). This patch tries every combination of multipliers and divisors of the PLL and the IP-core itself for getting as near as possible the the requested panel->pxl_clk. Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-01-11am335x-fb: cosmetic: fix coding styleHannes Schmelzer1-3/+3
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-01-11am335x-fb: cosmetic: update-copyrightHannes Schmelzer2-4/+4
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-01-03video: Support multiple lines version string displayPeng Fan1-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>
2018-01-03video: ipu: Fix dereferencing NULL pointer problemPeng Fan1-1/+5
The clk_set_rate function dereferences the clk pointer without checking whether it is NULL. This may cause problem when clk is NULL. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-12-02sunxi: video: HDMI: split VSYNC and HSYNC polarity settingsVasily Khoruzhick1-9/+5
These are actually different bits, and since some monitors (Benq BL2420PT) have modes with different HSYNC and VSYNC polarity, we should set them independently Tested on Pine64-LTS with Benq BL2420PT monitor. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-12-02video: sunxi: de2: add support for LCD SimpleFBIcenowy Zheng1-1/+10
Add support for setting up SimpleFB for LCD display output in DE2 SimpleFB setup code. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Jagan Teki <jagan@openedev.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-11-06video: sunxi: de2: fix SimpleFB node creation when HDMI not initializedIcenowy Zheng1-5/+11
When HDMI is not initialized (e.g. no monitor is plugged), the current SimpleFB code will still create a broken SimpleFB node. Detect whether HDMI is initialized when creating SimpleFB node. Fixes: be5b96f0e411 ("sunxi: setup simplefb for Allwinner DE2") Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Jagan Teki <jagan@openedev.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-29exynos: video: fix typo in DisplayPort driverDongjin Kim1-1/+1
Signed-off-by: Dongjin Kim <tobetter@gmail.com> CC: Simon Glass <sjg@chromium.org> CC: Minkyu Kang <mk7.kang@samsung.com>
2017-10-29video/da8xx-fb: Cache-align memory allocationsNiko Mauno1-4/+4
Resort to malloc_cache_aligned() rather than malloc() which also removes 'CACHE: Misaligned operation at range' warnings. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
2017-10-27sunxi: video: add LCD support to DE2 driverVasily Khoruzhick3-1/+170
Extend DE2 driver with LCD support. Tested on Pinebook which is based on A64 and has ANX6345 eDP bridge with eDP panel connected to it. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> [agust: rebased v5 on u-boot-video/master] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-10-27sunxi: video: split out PLL configuration codeVasily Khoruzhick2-116/+129
It will be reused in new DM LCD driver. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2017-10-26video: add anx6345 DM driverVasily Khoruzhick3-0/+435
This is a eDP bridge similar to ANX9804, it allows to connect eDP panels to the chips that can output only parallel signal Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> [agust: fixed most checkpatch errors/warnings] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-10-26video: anx9804: split out registers definitions into a separate headerVasily Khoruzhick2-53/+99
This header will be used in anx6345 driver Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> [agust: moved header to drivers/video] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-10-26dm: video: bridge: add operation to read EDIDVasily Khoruzhick1-0/+10
Add an operation to read EDID, since bridge may have ability to read EDID from the panel that is connected to it, for example LCD<->eDP bridge. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2017-10-26sunxi: setup simplefb for Allwinner DE2Icenowy Zheng2-1/+73
As the support of EFI boot on Allwinner H3 is broken, we still need to use simplefb to pass the framebuffer to Linux. Add code to setup simplefb for Allwinner DE2 driver. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-26video: add an option for video simplefb via DTIcenowy Zheng1-0/+8
Add an option to indicate that the video driver should setup a SimpleFB node that passes the video framebuffer initialized by U-Boot to the operating system kernel. Currently only the Allwinner DE driver uses this option, and the definition of this option in the sunxi-common.h config header is converted to an imply of this option from CONFIG_VIDEO_SUNXI. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-26video: sunxi: extract simplefb match code to a new fileIcenowy Zheng4-12/+55
As the DE2 simplefb setup code can also benefit from the simplefb match code, extract it to a new source file. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-09Merge git://git.denx.de/u-boot-videoTom Rini3-3/+214
2017-10-04treewide: replace with error() with pr_err()Masahiro Yamada1-1/+1
U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // <smpl> @@@@ -error +pr_err (...) // </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-29dm: video: Add color ANSI escape sequence supportRob Clark1-0/+94
Note that this doesn't differentiate (due to lack of information in video_priv) between different possible component orders for 32bpp. But the main user at this point is efi_loader, and GOP expects xBGR so any video drivers that this is incorrect for already have problems. (Also, conveniently, this matches what simple-framebuffer bindings expect for kernels that use the simple-framebuffer DT binding to take over the bootloader display.) Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-09-29dm: video: Add basic ANSI escape sequence supportRob Clark3-3/+117
Really just the subset that is needed by efi_console. Perhaps more will be added later, for example color support would be useful to implement efi_cout_set_attribute(). Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-29dm: video: Fix cache flushesRob Clark1-0/+3
Content can come to screen via putc() and we cannot always rely on updates ending with a puts(). This is the case with efi_console output to vidconsole. Fixes corruption with Shell.efi. Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-09-21Merge branch 'next' of git://git.denx.de/u-boot-videoTom Rini9-6/+657