summaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)Author
2019-07-29video: arm: rpi: Bail out early if querying video information failsFabian Vogt
When probing we query for the width and hight of the display. If the firmware does not report any connected display the system will crash. See https://github.com/raspberrypi/firmware/issues/1157 for details. Signed-off-by: Fabian Vogt <fvogt@suse.com> [mb: update commit message] Signed-off-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Andre Przywara <andre.przywara@arm.com>
2019-07-29video: dw_hdmi: Add support for ddc-i2c-bus propertyNiklas Schulze
Add support for the ddc-i2c-bus device tree property which allows for using an external i2c master for reading the display's EDID. Signed-off-by: Niklas Schulze <me@jns.io>
2019-07-29video: meson: dw-hdmi: add EDID mode filtering to only select supported modesNeil Armstrong
Add support for the new mode_valid() display op to filter out unsupported display DMT timings. This is useful when connected to 4k displays, since we only support DMT monitors up to 1920x1080, the 4k native timings are discarded to select supported timings. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-29video: display: use edid_get_timing_validate() variant to filter supported ↵Neil Armstrong
EDID modes Introduce a new display op, mode_valid() to be used with the newly introduced edid_get_timing_validate() function, to filter supported monitor timings if handled by the display driver. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-29video, simple_panel: add lg,lb070wv8 displayHeiko Schocher
add "lg,lb070wv8" display to compatible node. Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29video: mxsfb: fix mxsfb fbdev binding issuesIgor Opaniuk
Add support for display and bits-per-pixel properties. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-07-29video: fsl_dcu_fb: add DM_VIDEO supportIgor Opaniuk
Extend the driver to build with DM_VIDEO enabled. DTS files must additionally include 'u-boot,dm-pre-reloc' property in soc and child nodes to enable driver binding to fsl_dcu_fb device. Currently display timings aren't obtained from DT. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-07-29video: fsl_dcu_fb: refactor init functionsIgor Opaniuk
Move dcu-related code to fsl_dcu_probe_common, keep in video_hw_init() only legacy video stack (filling GraphicPanel struct etc.). Add wrappers for all init functions, that will let to provide struct fb_info as an additional param (needed for further moving it from the global scope to driver private data struct in DM converted driver). Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2019-07-20rockchip: video: rk3288_hdmi: Add missing call to dw_hdmi_enable()Niklas Schulze
The RK3288 HDMI driver's rk3288_hdmi_enable() currently lacks a call to dw_hdmi_enable(). Thus, the HDMI output never gets enabled. Signed-off-by: Niklas Schulze <me@jns.io> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Kever Yang <Kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-07-10fdt: Allow indicating a node is for U-Boot proper onlyPatrick Delaunay
This add missing parts for previous commit 06f94461a9f4 ("fdt: Allow indicating a node is for U-Boot proper only") At present it is not possible to specify that a node should be used before relocation (in U-Boot proper) without it also ending up in SPL and TPL device trees. Add a new "u-boot,dm-pre-proper" boolean property for this. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-06video: backlight: fix pwm inversionMarc Dietrich
set_pwm() will always fail with -ENOSYS if pwm_ops set_invert() is not implemented, leaving the backlight dark. Fix this by returning no error if set_invert() is not implemented and no polarity change is requested. Fixes: 57e7775413 ("video: backlight: Parse PWM polarity cell") Signed-off-by: Marc Dietrich <marvin24@gmx.de>
2019-06-05video: meson: hdmi-supply regulator should be optionalMaxime Jourdan
Some boards don't have such a regulator, and don't need one to enable HDMI display. Make it optional, fixing hdmi display for those boards. Also surround the regulator code with a config check on DM_REGULATOR. Reported-by: Mohammad Rasim <mohammad.rasim96@gmail.com> Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
2019-06-04video: mxsfb: add DM_VIDEO supportIgor Opaniuk
Extend the driver to build with DM_VIDEO enabled. DTS files must additionally include 'u-boot,dm-pre-reloc' property in soc and child nodes to enable driver binding to mxsfb device. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-04video: mxsfb: refactor video_hw_init()Igor Opaniuk
Refactor video_hw_init() function, and introduce an independent function for the common procedure of initialization. Currently video_hw_init() is only in charge of parsing configuration from env("videomode") and filling struct GraphicPanel, and new mxs_probe_common() does hw specific initialization (invocation of mxs_lcd_init() etc.) Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-04video: mxsfb: reorder includesIgor Opaniuk
Follow alphabetical order of includes, which simplifies detecting duplicate includes etc. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-04video: mxsfb: change mxs_lcd_init signatureIgor Opaniuk
Provide directly framebuffer address instead of pointer to GraphicDevice struct, which will let to re-use this function in DM_VIDEO configurations. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-05-21Merge tag 'video-for-2019.07-rc3' of git://git.denx.de/u-boot-videoTom Rini
- update for using splashfile instead of location->name when loading the splash image from a FIT - updates for loading internal and external splash data from FIT - DM_GPIO/DM_VIDEO migration for mx53 cx9020 board - fix boot issue on mx6sabresd board after DM_VIDEO migration - increase the max preallocated framebuffer BPP to 32 in ipuv3 driver to prepare for configurations with higher color depth - allow to use vidconsole_put_string() in board code for text output on LCD displays
2019-05-20video: Factor out vidconsole_put_string()Marek Vasut
Pull the vidconsole_put_string() function from DM tests, make it available to e.g. boards that want to display information on the LCD on boot. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2019-05-20video: ipuv3: Set max display bpp to 32Marek Vasut
The IPUv3 can handle 1920x1080x32bpp displays , set the max preallocated framebuffer BPP to 32 to cater for all eventualities. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de>
2019-05-20dm: arm: imx: video: add compatible for imx53-ipuSteffen Dirkwinkel
This code also works with imx53 ipus so we can enable it for them. Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2019-05-18CONFIG_SPL_SYS_[DI]CACHE_OFF: addTrevor Woerner
While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances where these configuration items are conditional on SPL. This commit adds SPL variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates the configurations as required. Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Trevor Woerner <trevor@toganlabs.com> [trini: Make the default depend on the setting for full U-Boot, update more zynq hardware] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-05-01rockchip: use 'arch-rockchip' as header file pathKever Yang
Rockchip use 'arch-rockchip' instead of arch-$(SOC) as common header file path, so that we can get the correct path directly. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-04-15Merge tag 'u-boot-imx-20190415' of git://git.denx.de/u-boot-imxTom Rini
Move to DM ----------- - DM support in sata - Toradex Board to DM - wandboard to DM - tbs2910 to DM - GE boards to DM - VHybrid boards to DM - DM_VIDEO for i.MX
2019-04-14sunxi: allow boards to de-select SYS_WHITE_ON_BLACK font schemeAndre Przywara
In the sunxi-common.h config header we unconditionally define CONFIG_SYS_WHITE_ON_BLACK, although it's actually a Kconfig option which could be individually selected by a user. Remove this #define from the header and let it default to "y" on sunxi boards (like we do for other platforms). Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-04-14video/console: Factor out actual character outputAndre Przywara
In preparation for doing character set translations, factor out the actual glyph display functionality into a separate function. This will be used in a subsequent patch. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-04-14video/console: Implement ANSI clear line commandAndre Przywara
There is a standard ANSI terminal escape sequence to clear a whole line of text. So far the DM_VIDEO console was missing this code. Detect the sequence and use vidconsole_set_row with the background colour to fix this omission. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-04-14video/console: Implement relative cursor movement ANSI handlingAndre Przywara
The ANSI terminal escapce sequence standard defines relative cursor movement commands (ESC [ A-F). So far the DM_VIDEO console code was ignoring them. Interpret those sequences and move the cursor by the requested amount of rows or columns in the right direction. This brings the code on par with the legacy video console driver (cfb_console). Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-04-14video/console: Implement reverse video ANSI sequence for DM_VIDEOAndre Przywara
The video console for DM_VIDEO compliant drivers only understands a very small number of ANSI sequences. First and foremost it misses the "reverse video" command, which is used by our own bootmenu command to highlight the selected entry. To avoid forcing people to use their imagination when using the bootmenu, let's just implement the rather simple reverse effect. We need to store the background colour index for that, so that we can recalculate both the foreground and background colour pixel values. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> [agust: merged BG color escape seq change to fix "ut dm video_ansi" test] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2019-04-14video/console: Fix DM_VIDEO font glyph array indexingAndre Przywara
When the character to be printed on a DM_VIDEO console is from the "extended ASCII" range (0x80 - 0xff), it will be treated as a negative number, as it's declared as a signed char. This leads to negative array indicies into the glyph bitmap array, and random garbled characters. Cast the character to an unsigned type to make the index always positive and avoid an out-of-bounds access. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-04-14video: backlight: Parse PWM polarity cellStefan Mavrodiev
This patch enables the reading of the polarity cell from a PWM phandle and calls pwm_set_invert(). Not all platforms have polarity cell, so skip if it's not pressent. Signed-off-by: Stefan Mavrodiev <stefan@olimex.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2019-04-13Add missing space in commentMarcel Ziswiler
Spotted two missing spaces in comments. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-04-13video: move ipuv3 files to subdirectoryAnatolij Gustschin
Place ipuv3 files and headers in custom driver subdirectory. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2019-04-13video: ipuv3: add DM_VIDEO supportAnatolij Gustschin
Extend the driver to build with DM_VIDEO enabled. DTS files must additionally include 'u-boot,dm-pre-reloc' property in soc and ipu nodes to enable driver binding to ipu device. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2019-03-28sunxi: video: HDMI: Fix clock setupJernej Skrabec
Currently, HDMI driver doesn't consider minimum and maximum allowed rate of pll3 (video PLL). It works most of the time, but not always. Consider monitor with resolution 1920x1200, which has pixel clock rate of 154 MHz. Current code would determine that pll3 rate has to be set to 154 MHz. However, minimum supported rate is 192 MHz. In this case video output just won't work. The reason why the driver is written in the way it is, is that at the time HDMI PHY and clock configuration wasn't fully understood. But now we have needed knowledge, so the issue can be fixed. With this fix, clock configuration routine uses full range (1-16) for clock divider instead of limited one (1, 2, 4, 11). It also considers minimum and maximum allowed rate for pll3. Fixes: 56009451d843 ("sunxi: video: Add A64/H3/H5 HDMI driver") Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
2019-02-15video: bmp: Add support for 24bpp BMP files on 16bpp displaysStefan Roese
This patch adds support to load 24bpp BMP files on 16bpp displays. This will be used by the theadorable board. The "old" bmp command did support this operartion mode and to not break compatibility with the move to DM_VIDEO, we need to add this support to the "new" bmp code. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Anatolij Gustschin <agust@denx.de> Acked-by: Anatolij Gustschin <agust@denx.de>
2019-02-15sunxi: display: Implement fallback to ddc probe when hpd failsPriit Laes
There are HDMI displays where hpd pin is not connected, thus we cannot get it to work unless we specifically set the resolution. Rework the display probing, so hotplug detect failure causes fallback to probing ddc for EDID data. Signed-off-by: Priit Laes <priit.laes@paf.com>
2019-02-15sunxi: display: Move DDC PLL setup to HDMI initPriit Laes
Move PLL initialization code to single place so we won't call it every time we query for EDID data. Signed-off-by: Priit Laes <priit.laes@paf.com>
2019-02-05video: Armada XP: Move driver to DM_VIDEOStefan Roese
This patch moves the Armada XP video / LCD driver to DM_VIDEO. With this move, the legacy interface board_video_init() is removed from the theadorable board code (only user of this video driver). The support via DT will be added in a separate patch. This patch also enables DM_VIDEO for the theadorable board, as this is needed to not break git bisect'ability. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Anatolij Gustschin <agust@denx.de> Acked-by: Anatolij Gustschin <agust@denx.de>
2019-01-31Merge tag 'video-updates-for-2019.04-rc1' of git://git.denx.de/u-boot-videoTom Rini
- ihs and imx driver fixes - relax EDID validation checks for 0 hsync/vsync pulse width (support some quirky displays)
2019-01-31video: Add Meson Video Processing Unit DriverNeil Armstrong
This adds video output support for Amlogic GXBB/GXL/GXM chips. The supported ports are CVBS and HDMI (based on DW_HDMI). When using HDMI, only DMT modes are supported. There is support for simple-framebuffer (CONFIG_VIDEO_DT_SIMPLEFB) Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Jorge Ramire-Ortiz <jramirez@baylibre.com> Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com> [narmstrong: fixed defines alignment in meson_canvas.c] Reviewed-by: Anatolij Gustschin <agust@denx.de>
2019-01-31video: dw_hdmi: add support for color conversionJorge Ramirez-Ortiz
Some IPs like the meson VPU can only feed a particular pixel format to dw_hdmi. As of now, the driver is hardcoded to use RGB888 as input. This commit enables different pixel format inputs, with the appropriate CSC configuration. Signed-off-by: Jorge Ramire-Ortiz <jramirez@baylibre.com> Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2019-01-31video: dw_hdmi: support SoC specific read/write opsJorge Ramirez-Ortiz
Some IPs like the meson VPU have a specific way to write to dw_hdmi registers. Make it configurable. Signed-off-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com> [added commit description] Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2019-01-28ihs_video_out: Fix error handlingMario Six
The ihs_video_out driver's error handling is incorrect in two places (one is a missing negation, and in one place a error should be ignored). Fix these two instances. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-01-28videomodes: Relax EDID validation checks for hsync/vsync pulse widthPriit Laes
Current EDID detailed timing parser errors out when either horizontal or vertical pulse sync width is 0, thus not allowing a display with EDID listed below work properly. EDID below works ok within Linux although it warns about these two fields being 0. Therefore relax the checks a bit so we can actually use this the screen out of the box. Of-course, this display itself is somewhat quirky display with following anti-features: - HPD pin is not usable - although resolution is 640x480, only top 240 pixels are visible $ xxd -p display.edid 00ffffffffffff0005a1e00301000000150f0103800f05780a0f6ea05748 9a2610474f200000010101010101010101010101010101012a08804520e0 0b1020004000953600000018000000fd0034441a2403000a202020202020 0000001000310a20202020202020202020200000001000002a4030701300 782d1100001e006b $ edid-decode display.edid EDID version: 1.3 Manufacturer: AMA Model 3e0 Serial Number 1 Digital display Maximum image size: 15 cm x 5 cm Gamma: 2.20 RGB color display First detailed timing is preferred timing Display x,y Chromaticity: Red: 0.6250, 0.3398 Green: 0.2841, 0.6044 Blue: 0.1494, 0.0644 White: 0.2802, 0.3105 Established timings supported: 640x480@60Hz 4:3 HorFreq: 31469 Hz Clock: 25.175 MHz Standard timings supported: Detailed mode: Clock 20.900 MHz, 149 mm x 54 mm 640 672 672 709 hborder 0 480 484 484 491 vborder 0 -hsync -vsync VertFreq: 60 Hz, HorFreq: 29478 Hz Monitor ranges (GTF): 52-68Hz V, 26-36kHz H, max dotclock 30MHz Dummy block Dummy block Checksum: 0x6b (valid) Signed-off-by: Priit Laes <priit.laes@paf.com> Signed-off-by: Priit Laes <plaes@plaes.org>
2019-01-18video: Kconfig: spelling fixesChris Packham
Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-12-28video: Add a default TrueType fontSimon Glass
At present it is possible to enable TrueType support but not include any fonts. This results in a blank display. Select Nimbus as the default font to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-12-05Merge tag 'dm-pull-5dec18' of git://git.denx.de/u-boot-dmTom Rini
Minor sandbox enhancements / fixes tpm improvements to clear up v1/v2 support buildman toolchain fixes New serial options to set/get config
2018-12-05video: backlight: Fix log message in enable_sequence()Simon Glass
This has an extra argument. Remove it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
2018-12-04video: use BMP_ALIGN_CENTER define from splash.hAnatolij Gustschin
Drop BMP_ALIGN_CENTER define in lcd.c and video_bmp.c as it is already defined by splash.h. Include splash.h in bmp code. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2018-12-03video: Allow driver to specify the line lengthSimon Glass
At present line_length is always calculated in video_post_probe(). But some hardware may use a different line length, e.g. with a 1366-wide display. Allow the driver to set this value if needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>