aboutsummaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)AuthorFilesLines
2020-01-08Merge tag 'u-boot-amlogic-20200108' of ↵Tom Rini7-15/+39
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic - Khadas VIM3L based on Amlogic S905D3 support - Various fixups for amlogic boards - Unnecessary header includes drop into video/meson
2020-01-07video: meson: Drop unnecessary header includesSimon Glass7-15/+39
These files should not be included in meson header files. Drop them and tidy up the affected C files. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-01-07video: lg4573: convert to DMHeiko Schocher1-39/+136
convert this driver to support DM. Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-02video: add wrappers for ttf type files to .gitignoreDario Binacchi1-0/+1
The scripts/Makefile.lib generates an assembler file (*.S) to wrap the font data for each file of type ttf defined in Kconfig. Signed-off-by: Dario Binacchi <dariobin@libero.it>
2020-01-02video: Avoid using #ifdef in video-uclass.cSimon Glass1-28/+26
This code does not really need to use #ifdef. We can use if() instead and gain build coverage without impacting code size. Change the #ifdefs to use IS_ENABLED(), etc., instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-02video: Avoid using #ifdef in vidconsole-uclass.cSimon Glass1-12/+10
This code does not really need to use #ifdef. We can use if() instead and gain build coverage without impacting code size. Change the #ifdefs to use CONFIG_IS_ENABLED() instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-02video: Avoid using #ifdef in console_rotate.cSimon Glass1-167/+158
This code does not really need to use #ifdef. We can use if() instead and gain build coverage without impacting code size. Change the #ifdefs to use IS_ENABLED() instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-02video: Avoid using #ifdef in video blitting codeSimon Glass1-64/+61
This code does not really need to use #ifdef. We can use if() instead and gain build coverage without impacting code size. Change the #ifdefs to use IS_ENABLED() instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-02video: x86: Enable 32-bit graphics by defaultSimon Glass1-4/+1
Most x86 boards that use video make use of 32bpp graphics. Enable this by default. This fixes missing graphics output on some x86 boards. Also remove the unnecessary 'default n' while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-12-06video: make BPP and ANSI configs optionalAnatolij Gustschin2-9/+9
Many boards do not use all selected framebuffer depth configurations, for such boards there is some unused code in video and console uclass routines. Make depth specific code optional to avoid dead code and slightly reduce binary size. Also make ANSI code optional for the same reason. When i.e. using only VIDEO_BPP16 the code size shrinks (below values when using gcc-7.3.0): $ ./tools/buildman/buildman -b video-wip -sS wandboard ... 01: Merge git://git.denx.de/u-boot-sh 02: video: add guards around 16bpp/32bbp code 03: video: make BPP and ANSI configs optional arm: (for 1/1 boards) all -776.0 bss -8.0 text -768.0 Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Eugen Hristev <eugen.hristev@microchip.com> Tested-by: Patrice Chotard <patrice.chotard@st.com> Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2019-12-06video: add guards around 16bpp/32bbp codeAnatolij Gustschin2-0/+10
Many boards use only single depth configuration, for such boards there is some unused code in video and console uclass routines. Add guards to avoid dead code. Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Eugen Hristev <eugen.hristev@microchip.com> Tested-by: Patrice Chotard <patrice.chotard@st.com> Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
2019-12-06video: bmp: Fix video_display_rle8_bitmap()Patrice Chotard1-5/+3
In case the BMP size is bigger than the frame buffer, don't use the BMP's width and height in video_display_rle8_bitmap, but the one's checked in video_bmp_display() as parameters to video_display_rle8_bitmap(). Signed-off-by: Patrice Chotard <patrice.chotard@st.com> CC: Yannick Fertré <yannick.fertre@st.com>
2019-12-06video: bmp: Fix video_splash_align_axis()Patrice Chotard1-2/+2
Convert panel_picture_delta and axis_alignment from unsigned long to long to insure to store correctly the difference between panel_size and picture_size in case the panel_size is smaller than picture_size. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> CC: Yannick Fertré <yannick.fertre@st.com> [agust: change axis_alignment to long] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2019-12-02common: Move board_get_usable_ram_top() out of common.hSimon Glass2-0/+2
Move this function into init.h which seems to be designed for this sort of thing. Also update the header to declare struct global_data so that it can be included without global_data.h being needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move ARM cache operations out of common.hSimon Glass3-0/+3
These functions are CPU-related and do not use driver model. Move them to cpu_func.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move some cache and MMU functions out of common.hSimon Glass1-0/+1
These functions belong in cpu_func.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move get_ticks() function out of common.hSimon Glass2-0/+2
This function belongs in time.h so move it over and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-11-24Revert "video: mxsfb: Configure the clock after eLCDIF reset"Fabio Estevam1-3/+3
Commit ec3dcea74470 ("video: mxsfb: Configure the clock after eLCDIF reset") causes boot regression on imx7d-pico/imx7d-sdb boards, so revert it until a better solution is prepared. This reverts commit ec3dcea7447031463643c33143b3a5f027f0b54d. Reported-by: Joris Offouga <offougajoris@gmail.com> Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-11-12video: stm32: remove the compatible "synopsys, dw-mipi-dsi" supportPatrick Delaunay2-7/+14
Remove the compatible "synopsys,dw-mipi-dsi" added in U-Boot (it don't exist in Linux kernel binding); it is only used to bind the generic synopsys UCLASS_DSI_HOST "dw_mipi_dsi" to the driver "stm32-display-dsi" UCLASS_VIDEO_BRIDGE This binding is done in Linux kernel drivers without compatible (dw_mipi_dsi_bind() is called in bind of driver, for example in drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c). This patch does the same in U-Boot driver, the STM32 driver calls during its bind the function device_bind_driver_to_node to bind the generic driver "dw_mipi_dsi" at the same address. This patch reduces the device tree differences between Linux kernel and U-Boot for stm32mp1 platform. Tested with v2020.01-rc1 on STM32MP157C-EV1 and STM32MP157C-DK2. The dependency of driver is clearer and the probe order is guaranteed. STM32MP> dm tree Class Index Probed Driver Name ----------------------------------------------------------- root 0 [ + ] root_driver root_driver sysreset 0 [ ] syscon_reboot |-- reboot simple_bus 0 [ + ] generic_simple_bus |-- soc serial 0 [ + ] serial_stm32 | |-- serial@40010000 ... video_brid 0 [ + ] stm32-display-dsi | |-- dsi@5a000000 dsi_host 0 [ + ] dw_mipi_dsi | | |-- dsihost panel 0 [ + ] rm68200_panel | | `-- panel-dsi@0 ... Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-11-12video: mxsfb: Configure the clock after eLCDIF resetFabio Estevam1-3/+3
Running stress reboot test on a i.MX6ULL evk board with a custom LCD can lead to splash screen failure (black screen). After comparing the eLCDIF initialization with the Linux kernel driver, it was noticed that the eLCDIF reset is the first operation that needs to be done. So do like the eLCDIF Linux driver and move the eLCDIF clock frequency configuration after the eLCDIF reset and just prior to setting the RUN bit. With this change applied, no more black screen issues has been found during overnight reboot stress tests. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-11-03video: mxsfb: set gd->fb_baseSébastien Szymanski1-0/+1
Set gd->fb_base so it can be shown with bdinfo command. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-10-18video: meson: add compatible for Amlogic G12ANeil Armstrong1-0/+1
Finally add the Amlogic G12A SoC compatible for the VPU driver. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2019-10-18video: meson: sync with linux drm-misc treeNeil Armstrong7-160/+930
Synchronize the Amlogic Meson Video driver back with the latest DRM misc tree, adding G12A platform support, from the latest commit: 528a25d040bc ("drm: meson: use match data to detect vpu compatibility") The sync includes the following changes from Linux adapted to U-Boot: - Add support for VIC alternate timings - Switch PLL to 5.94GHz base for 297Mhz pixel clock - Add registers for G12A SoC - Add G12A Support for VPP setup - Add G12A Support for VIU setup - Add G12A support for OSD1 Plane - Add G12A support for plane handling in CRTC driver - Add G12A support for CVBS Encoder - Add G12A Video Clock setup - Add G12A support for the DW-HDMI Glue - fix G12A HDMI PLL settings for 4K60 1000/1001 variations - fix primary plane disabling - fix G12A primary plane disabling - mask value when writing bits relaxed - crtc: drv: vpp: viu: venc: use proper macros instead of magic constants - global clean-up - add macro used to enable HDMI PLL - venc: set the correct macrovision max amplitude value Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2019-10-18video: meson: remove power domain getNeil Armstrong1-10/+0
Remove getting and enabling the node power domain since it's now handled by the dm core directly. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2019-10-13video: add support of panel RM68200Yannick Fertré3-0/+361
Support for Raydium RM68200 720p dsi 2dl video mode panel. This rm68200 panel driver is based on the Linux Kernel driver from drivers/gpu/drm/panel/panel-raydium-rm68200.c. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13video: add support of panel OTM8009AYannick Fertré3-0/+389
Support for Orise Tech otm8009a 480p dsi 2dl video mode panel. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13video: add support of STM32 MIPI DSI controller driverYannick Fertré3-0/+500
Add the STM32 DSI controller driver that uses the Synopsys DesignWare MIPI DSI host controller bridge. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13video: add MIPI DSI host controller bridgeYannick Fertré3-0/+849
Add a Synopsys Designware MIPI DSI host bridge driver, based on the Rockchip version from rockchip/dw-mipi-dsi.c with phy & bridge APIs. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13dm: Add a dsi host uclassYannick Fertré4-0/+142
Display Serial Interface (DSI) host can usefully be modelled as their own uclass. DSI defines a serial bus and a communication protocol between the host and the device (panel, bridge). Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13video: add support of MIPI DSI interfaceYannick Fertré3-0/+837
Mipi_display.c contains a set of dsi helpers. This file is a copy of file drm_mipi_dsi.c (linux kernel). Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-10-13video: stm32: stm32_ltdc: add bridge to display controllerYannick Fertré1-60/+83
Manage a bridge insert between the display controller & a panel. Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-09-21sunxi: video: HDMI: Fix LCD clock dividerMark Kettenis1-1/+1
Currently we may end up with an LCD clock divider that differs from the HDMI PHY clock divider if we can't exactly match the pixel clock. Fix this by using DIV_ROUND_UP to calculate the divider. This works since the PLL is chosen such that the resulting pixel clock is never higher than the requested pixel clock. Fixes: 1feed358ed15 ("sunxi: video: HDMI: Fix clock setup") Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2019-08-11env: Move env_get() to env.hSimon Glass6-0/+6
Move env_get() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11common: Move gzip functions into a new gzip headerSimon Glass1-0/+1
As part of the effort to remove things from common.h, create a new header for the gzip functions. Move the function declarations to it and add missing documentation. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-07-30mxc_ipuv3_fb.c: enable a backlight on a panelHeiko Schocher1-0/+5
check if we get a panel device, if so, enable the backlight on it. Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-30mxc_ipuv3_fb.c: call display_enableHeiko Schocher1-0/+13
call display_enable, so a display gets enabled. Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-30mxc_ipuv3_fb.c: set gd->fb_baseHeiko Schocher1-0/+2
set gd->fb_base so it can be shown with bdinfo command. Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29video: arm: rpi: Bail out early if querying video information failsFabian Vogt1-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>
2019-07-29video: dw_hdmi: Add support for ddc-i2c-bus propertyNiklas Schulze4-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>
2019-07-29video: meson: dw-hdmi: add EDID mode filtering to only select supported modesNeil Armstrong1-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>
2019-07-29video: display: use edid_get_timing_validate() variant to filter supported ↵Neil Armstrong1-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>
2019-07-29video, simple_panel: add lg,lb070wv8 displayHeiko Schocher1-0/+1
add "lg,lb070wv8" display to compatible node. Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-29video: mxsfb: fix mxsfb fbdev binding issuesIgor Opaniuk1-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>
2019-07-29video: fsl_dcu_fb: add DM_VIDEO supportIgor Opaniuk2-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>
2019-07-29video: fsl_dcu_fb: refactor init functionsIgor Opaniuk1-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>
2019-07-20rockchip: video: rk3288_hdmi: Add missing call to dw_hdmi_enable()Niklas Schulze1-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>
2019-07-10fdt: Allow indicating a node is for U-Boot proper onlyPatrick Delaunay1-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>
2019-07-06video: backlight: fix pwm inversionMarc Dietrich1-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>
2019-06-05video: meson: hdmi-supply regulator should be optionalMaxime Jourdan1-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>
2019-06-04video: mxsfb: add DM_VIDEO supportIgor Opaniuk1-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>