summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
* video: arm: rpi: Bail out early if querying video information failsFabian Vogt2019-07-291-1/+3
| | | | | | | | | | | | 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>
* video: dw_hdmi: Add support for ddc-i2c-bus propertyNiklas Schulze2019-07-294-0/+22
| | | | | | | 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>
* video: meson: dw-hdmi: add EDID mode filtering to only select supported modesNeil Armstrong2019-07-291-0/+7
| | | | | | | | | | | 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>
* video: display: use edid_get_timing_validate() variant to filter supported ↵Neil Armstrong2019-07-291-1/+14
| | | | | | | | | | 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>
* video, simple_panel: add lg,lb070wv8 displayHeiko Schocher2019-07-291-0/+1
| | | | | | add "lg,lb070wv8" display to compatible node. Signed-off-by: Heiko Schocher <hs@denx.de>
* video: mxsfb: fix mxsfb fbdev binding issuesIgor Opaniuk2019-07-291-12/+62
| | | | | | | 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>
* video: fsl_dcu_fb: add DM_VIDEO supportIgor Opaniuk2019-07-292-20/+94
| | | | | | | | | | | 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>
* video: fsl_dcu_fb: refactor init functionsIgor Opaniuk2019-07-291-47/+60
| | | | | | | | | | | | 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>
* rockchip: video: rk3288_hdmi: Add missing call to dw_hdmi_enable()Niklas Schulze2019-07-201-1/+1
| | | | | | | | | | 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>
* fdt: Allow indicating a node is for U-Boot proper onlyPatrick Delaunay2019-07-101-1/+3
| | | | | | | | | | | | 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>
* video: backlight: fix pwm inversionMarc Dietrich2019-07-061-0/+3
| | | | | | | | | | 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>
* video: meson: hdmi-supply regulator should be optionalMaxime Jourdan2019-06-051-4/+10
| | | | | | | | | | | | 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>
* video: mxsfb: add DM_VIDEO supportIgor Opaniuk2019-06-041-9/+136
| | | | | | | | 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>
* video: mxsfb: refactor video_hw_init()Igor Opaniuk2019-06-041-27/+41
| | | | | | | | | | | | 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>
* video: mxsfb: reorder includesIgor Opaniuk2019-06-041-4/+3
| | | | | | | Follow alphabetical order of includes, which simplifies detecting duplicate includes etc. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
* video: mxsfb: change mxs_lcd_init signatureIgor Opaniuk2019-06-041-5/+4
| | | | | | | | 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>
* Merge tag 'video-for-2019.07-rc3' of git://git.denx.de/u-boot-videoTom Rini2019-05-212-3/+17
|\ | | | | | | | | | | | | | | | | | | | | | | - 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
| * video: Factor out vidconsole_put_string()Marek Vasut2019-05-201-2/+15
| | | | | | | | | | | | | | | | | | | | 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>
| * video: ipuv3: Set max display bpp to 32Marek Vasut2019-05-201-1/+1
| | | | | | | | | | | | | | | | 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>
| * dm: arm: imx: video: add compatible for imx53-ipuSteffen Dirkwinkel2019-05-201-0/+1
| | | | | | | | | | | | This code also works with imx53 ipus so we can enable it for them. Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
* | CONFIG_SPL_SYS_[DI]CACHE_OFF: addTrevor Woerner2019-05-181-1/+1
|/ | | | | | | | | | | | | 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>
* rockchip: use 'arch-rockchip' as header file pathKever Yang2019-05-0112-39/+36
| | | | | | | | 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>
* Merge tag 'u-boot-imx-20190415' of git://git.denx.de/u-boot-imxTom Rini2019-04-1511-10/+106
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Add missing space in commentMarcel Ziswiler2019-04-131-1/+1
| | | | | | | | | | | | | | Spotted two missing spaces in comments. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
| * video: move ipuv3 files to subdirectoryAnatolij Gustschin2019-04-1310-8/+17
| | | | | | | | | | | | Place ipuv3 files and headers in custom driver subdirectory. Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * video: ipuv3: add DM_VIDEO supportAnatolij Gustschin2019-04-132-7/+94
| | | | | | | | | | | | | | | | 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>
* | sunxi: allow boards to de-select SYS_WHITE_ON_BLACK font schemeAndre Przywara2019-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | video/console: Factor out actual character outputAndre Przywara2019-04-141-15/+27
| | | | | | | | | | | | | | | | | | 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>
* | video/console: Implement ANSI clear line commandAndre Przywara2019-04-141-0/+19
| | | | | | | | | | | | | | | | | | | | | | 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>
* | video/console: Implement relative cursor movement ANSI handlingAndre Przywara2019-04-141-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | video/console: Implement reverse video ANSI sequence for DM_VIDEOAndre Przywara2019-04-142-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | video/console: Fix DM_VIDEO font glyph array indexingAndre Przywara2019-04-142-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | video: backlight: Parse PWM polarity cellStefan Mavrodiev2019-04-141-0/+11
|/ | | | | | | | | | 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>
* sunxi: video: HDMI: Fix clock setupJernej Skrabec2019-03-281-25/+37
| | | | | | | | | | | | | | | | | | | | | | 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>
* video: bmp: Add support for 24bpp BMP files on 16bpp displaysStefan Roese2019-02-151-6/+17
| | | | | | | | | | | 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>
* sunxi: display: Implement fallback to ddc probe when hpd failsPriit Laes2019-02-151-7/+21
| | | | | | | | | | 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>
* sunxi: display: Move DDC PLL setup to HDMI initPriit Laes2019-02-151-7/+7
| | | | | | | 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>
* video: Armada XP: Move driver to DM_VIDEOStefan Roese2019-02-051-129/+192
| | | | | | | | | | | | | | 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>
* Merge tag 'video-updates-for-2019.04-rc1' of git://git.denx.de/u-boot-videoTom Rini2019-01-312-5/+3
|\ | | | | | | | | | | - ihs and imx driver fixes - relax EDID validation checks for 0 hsync/vsync pulse width (support some quirky displays)
| * ihs_video_out: Fix error handlingMario Six2019-01-281-3/+3
| | | | | | | | | | | | | | | | | | 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>
| * videomodes: Relax EDID validation checks for hsync/vsync pulse widthPriit Laes2019-01-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | video: Add Meson Video Processing Unit DriverNeil Armstrong2019-01-3116-0/+5373
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | video: dw_hdmi: add support for color conversionJorge Ramirez-Ortiz2019-01-311-1/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | video: dw_hdmi: support SoC specific read/write opsJorge Ramirez-Ortiz2019-01-311-2/+12
|/ | | | | | | | | | | 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>
* video: Kconfig: spelling fixesChris Packham2019-01-181-1/+1
| | | | | | 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>
* video: Add a default TrueType fontSimon Glass2018-12-281-0/+1
| | | | | | | | | 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>
* Merge tag 'dm-pull-5dec18' of git://git.denx.de/u-boot-dmTom Rini2018-12-051-1/+1
|\ | | | | | | | | | | | | Minor sandbox enhancements / fixes tpm improvements to clear up v1/v2 support buildman toolchain fixes New serial options to set/get config
| * video: backlight: Fix log message in enable_sequence()Simon Glass2018-12-051-1/+1
| | | | | | | | | | | | | | This has an extra argument. Remove it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* | video: use BMP_ALIGN_CENTER define from splash.hAnatolij Gustschin2018-12-041-2/+1
| | | | | | | | | | | | | | 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>
* | video: Allow driver to specify the line lengthSimon Glass2018-12-031-1/+3
|/ | | | | | | | | | | 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>