diff options
Diffstat (limited to 'drivers/video')
119 files changed, 106 insertions, 163 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 7808ae7919e..6e79694fd19 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -7,6 +7,7 @@ menu "Graphics support" config VIDEO bool "Enable driver model support for LCD/video" depends on DM + imply CYCLIC help This enables driver model for LCD and video devices. These support a bitmap display of various sizes and depths which can be drawn on @@ -14,6 +15,11 @@ config VIDEO option compiles in the video uclass and routes all LCD/video access through this. + If CYCLIC is enabled (which it is by default), the cyclic subsystem + is used to flush pending output to the display periodically, rather + than this happening with every chunk of output. This allows for more + efficient operation and faster display output. + if VIDEO config VIDEO_FONT_4X6 @@ -232,6 +238,35 @@ config NO_FB_CLEAR loads takes over the screen. This, for example, can be used to keep splash image on screen until grub graphical boot menu starts. +config VIDEO_SYNC_MS + int "Video-sync period in milliseconds for foreground processing" + default 300 if SANDBOX + default 100 + help + This sets the requested, maximum time before a video sync will take + place, in milliseconds. Note that the time between video syncs + may be longer than this, since syncs only happen when the video system + is used, e.g. by outputting a character to the console. + + It may also be shorter, since the video uclass will automatically + force a sync in certain situations. + + Many video-output systems require a sync operation before any output + is visible. This may flush the CPU cache or perhaps copy the + display contents to a hardware framebuffer. Without this, change to + the video may never be displayed. + +config VIDEO_SYNC_CYCLIC_MS + int "Video-sync period in milliseconds for cyclic processing" + depends on CYCLIC + default 100 if SANDBOX + default 10 + help + This sets the frequency of cyclic video syncs. The cyclic system is + used to ensure that when U-Boot is idle, it syncs the video. This + improves the responsiveness of the command line to new characters + being entered. + config PANEL bool "Enable panel uclass support" default y diff --git a/drivers/video/anx9804.c b/drivers/video/anx9804.c index 52b5988ba5f..a149e6f5b95 100644 --- a/drivers/video/anx9804.c +++ b/drivers/video/anx9804.c @@ -9,7 +9,6 @@ * interface for driving eDP TFT displays. */ -#include <common.h> #include <i2c.h> #include <linux/delay.h> #include "anx98xx-edp.h" diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c index 652ba141801..89bc0eeb680 100644 --- a/drivers/video/atmel_hlcdfb.c +++ b/drivers/video/atmel_hlcdfb.c @@ -5,7 +5,6 @@ * Copyright (C) 2012 Atmel Corporation */ -#include <common.h> #include <cpu_func.h> #include <log.h> #include <malloc.h> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 5a7a54ada70..281c3a1d663 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -5,7 +5,6 @@ * Copyright (C) 2007 Atmel Corporation */ -#include <common.h> #include <atmel_lcd.h> #include <dm.h> #include <fdtdec.h> diff --git a/drivers/video/backlight-uclass.c b/drivers/video/backlight-uclass.c index c14996d003c..2a09b2da910 100644 --- a/drivers/video/backlight-uclass.c +++ b/drivers/video/backlight-uclass.c @@ -6,7 +6,6 @@ #define LOG_CATEGORY UCLASS_PANEL_BACKLIGHT -#include <common.h> #include <dm.h> #include <backlight.h> diff --git a/drivers/video/backlight_gpio.c b/drivers/video/backlight_gpio.c index eea824ab5e1..b26fa9a8acf 100644 --- a/drivers/video/backlight_gpio.c +++ b/drivers/video/backlight_gpio.c @@ -4,7 +4,6 @@ * Author: Patrick Delaunay <patrick.delaunay@foss.st.com> */ -#include <common.h> #include <dm.h> #include <backlight.h> #include <log.h> diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c index 63efa762db1..0c81e606622 100644 --- a/drivers/video/bcm2835.c +++ b/drivers/video/bcm2835.c @@ -3,7 +3,6 @@ * (C) Copyright 2012 Stephen Warren */ -#include <common.h> #include <dm.h> #include <log.h> #include <video.h> diff --git a/drivers/video/bmp.c b/drivers/video/bmp.c index bab6fa7265a..291ed36440c 100644 --- a/drivers/video/bmp.c +++ b/drivers/video/bmp.c @@ -8,7 +8,6 @@ * BMP handling routines */ -#include <common.h> #include <bmp_layout.h> #include <command.h> #include <dm.h> diff --git a/drivers/video/bochs.c b/drivers/video/bochs.c index 022ea38d4cf..00e673a4db0 100644 --- a/drivers/video/bochs.c +++ b/drivers/video/bochs.c @@ -5,7 +5,6 @@ #define LOG_CATEGORY UCLASS_VIDEO -#include <common.h> #include <dm.h> #include <log.h> #include <pci.h> diff --git a/drivers/video/bridge/anx6345.c b/drivers/video/bridge/anx6345.c index 93fa25f16e3..8cee4c958bd 100644 --- a/drivers/video/bridge/anx6345.c +++ b/drivers/video/bridge/anx6345.c @@ -3,7 +3,6 @@ * Copyright (C) 2017 Vasily Khoruzhick <anarsoul@gmail.com> */ -#include <common.h> #include <dm.h> #include <errno.h> #include <i2c.h> diff --git a/drivers/video/bridge/ps862x.c b/drivers/video/bridge/ps862x.c index d1d22a6e235..efd03752281 100644 --- a/drivers/video/bridge/ps862x.c +++ b/drivers/video/bridge/ps862x.c @@ -4,7 +4,6 @@ * Written by Simon Glass <sjg@chromium.org> */ -#include <common.h> #include <dm.h> #include <errno.h> #include <i2c.h> diff --git a/drivers/video/bridge/ptn3460.c b/drivers/video/bridge/ptn3460.c index 4760f04108f..5851e1ef15e 100644 --- a/drivers/video/bridge/ptn3460.c +++ b/drivers/video/bridge/ptn3460.c @@ -4,7 +4,6 @@ * Written by Simon Glass <sjg@chromium.org> */ -#include <common.h> #include <dm.h> #include <log.h> #include <video_bridge.h> diff --git a/drivers/video/bridge/ssd2825.c b/drivers/video/bridge/ssd2825.c index f0ef3dafb93..f978021c860 100644 --- a/drivers/video/bridge/ssd2825.c +++ b/drivers/video/bridge/ssd2825.c @@ -3,7 +3,6 @@ * Copyright (c) 2022 Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <clk.h> #include <dm.h> #include <log.h> diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c index f389bc6b147..2084a2e03ee 100644 --- a/drivers/video/bridge/video-bridge-uclass.c +++ b/drivers/video/bridge/video-bridge-uclass.c @@ -6,7 +6,6 @@ #define LOG_CATEGORY UCLASS_VIDEO_BRIDGE -#include <common.h> #include <dm.h> #include <errno.h> #include <edid.h> diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c index 83b6c908a8d..03b37fd8a9e 100644 --- a/drivers/video/broadwell_igd.c +++ b/drivers/video/broadwell_igd.c @@ -5,12 +5,12 @@ * Copyright (C) 2016 Google, Inc */ -#include <common.h> #include <bios_emul.h> #include <bootstage.h> #include <dm.h> #include <init.h> #include <log.h> +#include <time.h> #include <vesa.h> #include <video.h> #include <asm/cpu.h> @@ -319,7 +319,6 @@ err: return ret; }; - static unsigned long gtt_read(struct broadwell_igd_priv *priv, unsigned long reg) { diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c index 34ef5a52294..6f4194a1814 100644 --- a/drivers/video/console_normal.c +++ b/drivers/video/console_normal.c @@ -6,7 +6,6 @@ * (C) Copyright 2023 Dzmitry Sankouski <dsankouski@gmail.com> */ -#include <common.h> #include <charset.h> #include <dm.h> #include <video.h> diff --git a/drivers/video/console_rotate.c b/drivers/video/console_rotate.c index e4303dfb364..a3f8c6352f8 100644 --- a/drivers/video/console_rotate.c +++ b/drivers/video/console_rotate.c @@ -6,7 +6,6 @@ * (C) Copyright 2023 Dzmitry Sankouski <dsankouski@gmail.com> */ -#include <common.h> #include <charset.h> #include <dm.h> #include <video.h> @@ -101,7 +100,6 @@ static int console_putc_xy_1(struct udevice *dev, uint x_frac, uint y, int cp) return VID_TO_POS(fontdata->width); } - static int console_set_row_2(struct udevice *dev, uint row, int clr) { struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent); diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c index 28665a32757..c435162d3f9 100644 --- a/drivers/video/console_truetype.c +++ b/drivers/video/console_truetype.c @@ -3,7 +3,6 @@ * Copyright (c) 2016 Google, Inc */ -#include <common.h> #include <abuf.h> #include <dm.h> #include <log.h> diff --git a/drivers/video/coreboot.c b/drivers/video/coreboot.c index 5b718ae3e5a..9aede262642 100644 --- a/drivers/video/coreboot.c +++ b/drivers/video/coreboot.c @@ -3,7 +3,6 @@ * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> #include <dm.h> #include <init.h> #include <vesa.h> diff --git a/drivers/video/display-uclass.c b/drivers/video/display-uclass.c index 2da3d1d14e9..61a73e1bc2a 100644 --- a/drivers/video/display-uclass.c +++ b/drivers/video/display-uclass.c @@ -5,7 +5,6 @@ #define LOG_CATEGORY UCLASS_DISPLAY -#include <common.h> #include <dm.h> #include <display.h> #include <edid.h> diff --git a/drivers/video/dsi-host-uclass.c b/drivers/video/dsi-host-uclass.c index 6e5256eb126..fde275ad7e2 100644 --- a/drivers/video/dsi-host-uclass.c +++ b/drivers/video/dsi-host-uclass.c @@ -7,7 +7,6 @@ #define LOG_CATEGORY UCLASS_DSI_HOST -#include <common.h> #include <dm.h> #include <dsi_host.h> diff --git a/drivers/video/dw_hdmi.c b/drivers/video/dw_hdmi.c index c217af97878..1bf65fbd89e 100644 --- a/drivers/video/dw_hdmi.c +++ b/drivers/video/dw_hdmi.c @@ -5,13 +5,14 @@ * Copyright 2017 Jernej Skrabec <jernej.skrabec@siol.net> */ -#include <common.h> #include <fdtdec.h> #include <log.h> #include <asm/io.h> #include <i2c.h> #include <media_bus_format.h> +#include <time.h> #include <linux/delay.h> +#include <linux/errno.h> #include "dw_hdmi.h" struct tmds_n_cts { @@ -761,7 +762,6 @@ static void hdmi_audio_set_format(struct dw_hdmi *hdmi) hdmi_write(hdmi, HDMI_AUD_CONF0_I2S_SELECT | HDMI_AUD_CONF0_I2S_IN_EN_0, HDMI_AUD_CONF0); - hdmi_write(hdmi, HDMI_AUD_CONF1_I2S_MODE_STANDARD_MODE | HDMI_AUD_CONF1_I2S_WIDTH_16BIT, HDMI_AUD_CONF1); diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index a7e0784596a..c74fe678d12 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -9,7 +9,6 @@ * the Linux Kernel driver drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c. */ -#include <common.h> #include <clk.h> #include <dsi_host.h> #include <dm.h> diff --git a/drivers/video/efi.c b/drivers/video/efi.c index 28ac15ff61b..78d123fad4b 100644 --- a/drivers/video/efi.c +++ b/drivers/video/efi.c @@ -7,7 +7,6 @@ #define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <dm.h> #include <efi_api.h> #include <log.h> diff --git a/drivers/video/endeavoru-panel.c b/drivers/video/endeavoru-panel.c index 1bff641434e..d4ba4d8b6da 100644 --- a/drivers/video/endeavoru-panel.c +++ b/drivers/video/endeavoru-panel.c @@ -3,7 +3,6 @@ * Copyright (c) 2022 Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <backlight.h> #include <dm.h> #include <panel.h> diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c index 59838da6c92..d17cea396fe 100644 --- a/drivers/video/exynos/exynos_dp.c +++ b/drivers/video/exynos/exynos_dp.c @@ -5,7 +5,6 @@ * Author: Donghwa Lee <dh09.lee@samsung.com> */ -#include <common.h> #include <dm.h> #include <display.h> #include <fdtdec.h> @@ -1065,7 +1064,6 @@ int exynos_dp_enable(struct udevice *dev, int panel_bpp, return ret; } - static const struct dm_display_ops exynos_dp_ops = { .enable = exynos_dp_enable, }; diff --git a/drivers/video/exynos/exynos_dp_lowlevel.c b/drivers/video/exynos/exynos_dp_lowlevel.c index ae500a70280..552524d838d 100644 --- a/drivers/video/exynos/exynos_dp_lowlevel.c +++ b/drivers/video/exynos/exynos_dp_lowlevel.c @@ -6,7 +6,6 @@ */ #include <config.h> -#include <common.h> #include <log.h> #include <linux/delay.h> #include <linux/err.h> @@ -66,7 +65,6 @@ void exynos_dp_enable_video_mute(struct exynos_dp *dp_regs, unsigned int enable) return; } - static void exynos_dp_init_analog_param(struct exynos_dp *dp_regs) { unsigned int reg; diff --git a/drivers/video/exynos/exynos_fb.c b/drivers/video/exynos/exynos_fb.c index 86970a6d5d2..0407a3f51b0 100644 --- a/drivers/video/exynos/exynos_fb.c +++ b/drivers/video/exynos/exynos_fb.c @@ -7,7 +7,6 @@ */ #include <config.h> -#include <common.h> #include <display.h> #include <div64.h> #include <dm.h> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c index 804fcd0b248..edeb0a87bbb 100644 --- a/drivers/video/exynos/exynos_mipi_dsi.c +++ b/drivers/video/exynos/exynos_mipi_dsi.c @@ -6,7 +6,6 @@ * Author: Donghwa Lee <dh09.lee@samsung.com> */ -#include <common.h> #include <log.h> #include <malloc.h> #include <fdtdec.h> diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c index be67cebae7f..fc2767adc38 100644 --- a/drivers/video/exynos/exynos_mipi_dsi_common.c +++ b/drivers/video/exynos/exynos_mipi_dsi_common.c @@ -6,7 +6,6 @@ * Author: Donghwa Lee <dh09.lee@samsung.com> */ -#include <common.h> #include <log.h> #include <linux/delay.h> #include <linux/err.h> diff --git a/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c b/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c index 8111acd9a0b..9f18b5da102 100644 --- a/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c +++ b/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c @@ -6,7 +6,6 @@ * Author: Donghwa Lee <dh09.lee@samsung.com> */ -#include <common.h> #include <asm/arch/dsim.h> #include <asm/arch/mipi_dsim.h> #include <asm/arch/power.h> diff --git a/drivers/video/himax-hx8394.c b/drivers/video/himax-hx8394.c index 63637b4db02..cb7f93e9c99 100644 --- a/drivers/video/himax-hx8394.c +++ b/drivers/video/himax-hx8394.c @@ -2,7 +2,6 @@ /* * Copyright (C) 2022 Ondrej Jirman <megi@xff.cz> */ -#include <common.h> #include <backlight.h> #include <dm.h> #include <mipi_dsi.h> diff --git a/drivers/video/hitachi_tx18d42vm_lcd.c b/drivers/video/hitachi_tx18d42vm_lcd.c index 95984fe3d3d..68f7b75eef9 100644 --- a/drivers/video/hitachi_tx18d42vm_lcd.c +++ b/drivers/video/hitachi_tx18d42vm_lcd.c @@ -5,7 +5,6 @@ * (C) Copyright 2015 Hans de Goede <hdegoede@redhat.com> */ -#include <common.h> #include <malloc.h> #include <linux/delay.h> diff --git a/drivers/video/hx8238d.c b/drivers/video/hx8238d.c index 6ee97cb4ff3..2491a32810e 100644 --- a/drivers/video/hx8238d.c +++ b/drivers/video/hx8238d.c @@ -12,7 +12,6 @@ * */ -#include <common.h> #include <dm.h> #include <panel.h> #include <spi.h> diff --git a/drivers/video/ihs_video_out.c b/drivers/video/ihs_video_out.c index 73b8f4bd1c9..bf4d4995c36 100644 --- a/drivers/video/ihs_video_out.c +++ b/drivers/video/ihs_video_out.c @@ -9,7 +9,6 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.de */ -#include <common.h> #include <display.h> #include <dm.h> #include <log.h> diff --git a/drivers/video/imx/ipu.h b/drivers/video/imx/ipu.h index 1e02c7ab6d5..4c13c9342f7 100644 --- a/drivers/video/imx/ipu.h +++ b/drivers/video/imx/ipu.h @@ -143,7 +143,6 @@ enum ipu_dmfc_type { DMFC_HIGH_RESOLUTION_ONLY_DP, }; - /* * Union of initialization parameters for a logical channel. */ diff --git a/drivers/video/imx/ipu_common.c b/drivers/video/imx/ipu_common.c index b0a99c9cd5d..bd1ef0a800d 100644 --- a/drivers/video/imx/ipu_common.c +++ b/drivers/video/imx/ipu_common.c @@ -11,7 +11,7 @@ */ /* #define DEBUG */ -#include <common.h> +#include <config.h> #include <log.h> #include <linux/delay.h> #include <linux/types.h> @@ -204,7 +204,6 @@ static void clk_ipu_disable(struct clk *clk) #endif } - static struct clk ipu_clk = { .name = "ipu_clk", #if defined(CONFIG_MX51) || defined(CONFIG_MX53) @@ -272,7 +271,6 @@ static inline int ipu_is_dmfc_chan(uint32_t dma_chan) return ((dma_chan >= 23) && (dma_chan <= 29)); } - static inline void ipu_ch_param_set_buffer(uint32_t ch, int bufNum, dma_addr_t phyaddr) { @@ -588,7 +586,6 @@ int32_t ipu_init_channel(ipu_channel_t channel, ipu_channel_params_t *params) clk_enable(g_ipu_clk); } - if (g_channel_init_mask & (1L << IPU_CHAN_ID(channel))) { printf("Warning: channel already initialized %d\n", IPU_CHAN_ID(channel)); @@ -954,7 +951,6 @@ static void ipu_ch_param_init(int ch, break; } - if (uv_stride) ipu_ch_param_set_field(¶ms, 1, 128, 14, uv_stride - 1); diff --git a/drivers/video/imx/ipu_disp.c b/drivers/video/imx/ipu_disp.c index 144322e4e26..aaba7d135a4 100644 --- a/drivers/video/imx/ipu_disp.c +++ b/drivers/video/imx/ipu_disp.c @@ -12,7 +12,6 @@ /* #define DEBUG */ -#include <common.h> #include <log.h> #include <linux/delay.h> #include <linux/types.h> diff --git a/drivers/video/imx/ipu_regs.h b/drivers/video/imx/ipu_regs.h index deb44002d75..8d6ec4845f4 100644 --- a/drivers/video/imx/ipu_regs.h +++ b/drivers/video/imx/ipu_regs.h @@ -353,13 +353,11 @@ struct ipu_dmfc { #define DMFC_GENERAL1 (&DMFC_REG->general[0]) #define DMFC_IC_CTRL (&DMFC_REG->ic_ctrl) - #define DC_REG ((struct ipu_dc *)(IPU_CTRL_BASE_ADDR + \ IPU_DC_REG_BASE)) #define DC_MAP_CONF_PTR(n) (&DC_REG->dc_map_ptr[n / 2]) #define DC_MAP_CONF_VAL(n) (&DC_REG->dc_map_val[n / 2]) - static inline struct ipu_dc_ch *dc_ch_offset(int ch) { switch (ch) { diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c index 7e60385bcfa..fdeb3cabea7 100644 --- a/drivers/video/imx/mxc_ipuv3_fb.c +++ b/drivers/video/imx/mxc_ipuv3_fb.c @@ -10,7 +10,6 @@ * (C) Copyright 2004-2010 Freescale Semiconductor, Inc. */ -#include <common.h> #include <log.h> #include <part.h> #include <asm/cache.h> @@ -404,7 +403,6 @@ static int mxcfb_map_video_memory(struct fb_info *fbi) (uint32_t) fbi->fix.smem_start, fbi->fix.smem_len); fbi->screen_size = fbi->fix.smem_len; - gd->fb_base = fbi->fix.smem_start; /* Clear the screen */ memset((char *)fbi->screen_base, 0, fbi->fix.smem_len); @@ -634,7 +632,6 @@ static int ipuv3_video_probe(struct udevice *dev) mmu_set_region_dcache_behaviour(fb_start, fb_end - fb_start, DCACHE_WRITEBACK); video_set_flush_dcache(dev, true); - gd->fb_base = fb_start; return 0; } diff --git a/drivers/video/ivybridge_igd.c b/drivers/video/ivybridge_igd.c index c2cc976618a..ad688640733 100644 --- a/drivers/video/ivybridge_igd.c +++ b/drivers/video/ivybridge_igd.c @@ -3,7 +3,6 @@ * Copyright (C) 2016 Google, Inc */ -#include <common.h> #include <bios_emul.h> #include <dm.h> #include <errno.h> diff --git a/drivers/video/lm3533_backlight.c b/drivers/video/lm3533_backlight.c index 00297a09b7f..6b51fa0628e 100644 --- a/drivers/video/lm3533_backlight.c +++ b/drivers/video/lm3533_backlight.c @@ -6,7 +6,6 @@ #define LOG_CATEGORY UCLASS_PANEL_BACKLIGHT #include <backlight.h> -#include <common.h> #include <dm.h> #include <i2c.h> #include <log.h> diff --git a/drivers/video/logicore_dp_tx.c b/drivers/video/logicore_dp_tx.c index 624084d38bc..643a77a0f4e 100644 --- a/drivers/video/logicore_dp_tx.c +++ b/drivers/video/logicore_dp_tx.c @@ -9,7 +9,6 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/mali_dp.c b/drivers/video/mali_dp.c index dbb2f538617..c8921267462 100644 --- a/drivers/video/mali_dp.c +++ b/drivers/video/mali_dp.c @@ -5,7 +5,6 @@ * */ #define DEBUG -#include <common.h> #include <malloc.h> #include <video.h> #include <dm.h> diff --git a/drivers/video/mcde_simple.c b/drivers/video/mcde_simple.c index 0924ceee309..2ba5d0de152 100644 --- a/drivers/video/mcde_simple.c +++ b/drivers/video/mcde_simple.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* Copyright (C) 2019 Stephan Gerhold */ -#include <common.h> #include <dm.h> #include <log.h> #include <video.h> diff --git a/drivers/video/meson/meson_canvas.c b/drivers/video/meson/meson_canvas.c index eccac2f8f24..dd4c546222d 100644 --- a/drivers/video/meson/meson_canvas.c +++ b/drivers/video/meson/meson_canvas.c @@ -6,7 +6,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <asm/io.h> diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c index 259af1b4571..587df7beb9b 100644 --- a/drivers/video/meson/meson_dw_hdmi.c +++ b/drivers/video/meson/meson_dw_hdmi.c @@ -4,7 +4,6 @@ * Author: Jorge Ramirez-Ortiz <jramirez@baylibre.com> */ -#include <common.h> #include <display.h> #include <dm.h> #include <edid.h> diff --git a/drivers/video/meson/meson_plane.c b/drivers/video/meson/meson_plane.c index e3f784ecfe4..899ce22d067 100644 --- a/drivers/video/meson/meson_plane.c +++ b/drivers/video/meson/meson_plane.c @@ -6,7 +6,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <asm/io.h> #include <linux/bitfield.h> diff --git a/drivers/video/meson/meson_vclk.c b/drivers/video/meson/meson_vclk.c index e718a0074ed..4761ff661e4 100644 --- a/drivers/video/meson/meson_vclk.c +++ b/drivers/video/meson/meson_vclk.c @@ -6,7 +6,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <edid.h> #include <linux/bitops.h> diff --git a/drivers/video/meson/meson_venc.c b/drivers/video/meson/meson_venc.c index e7366dd2fde..1bc6aaf7305 100644 --- a/drivers/video/meson/meson_venc.c +++ b/drivers/video/meson/meson_venc.c @@ -6,7 +6,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <edid.h> #include <fdtdec.h> diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c index 67d4ce7b3b4..ca627728743 100644 --- a/drivers/video/meson/meson_vpu.c +++ b/drivers/video/meson/meson_vpu.c @@ -6,7 +6,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <display.h> #include <dm.h> #include <efi_loader.h> diff --git a/drivers/video/meson/meson_vpu_init.c b/drivers/video/meson/meson_vpu_init.c index c9808e1c631..0e34cefd100 100644 --- a/drivers/video/meson/meson_vpu_init.c +++ b/drivers/video/meson/meson_vpu_init.c @@ -8,7 +8,6 @@ #define DEBUG -#include <common.h> #include <dm.h> #include <asm/io.h> #include <linux/bitops.h> diff --git a/drivers/video/mipi_dsi.c b/drivers/video/mipi_dsi.c index ecacea1dbeb..dc949c8ae61 100644 --- a/drivers/video/mipi_dsi.c +++ b/drivers/video/mipi_dsi.c @@ -32,7 +32,6 @@ * */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c index d3d07e5f833..9f1ea9c3564 100644 --- a/drivers/video/mvebu_lcd.c +++ b/drivers/video/mvebu_lcd.c @@ -5,7 +5,6 @@ * Initialization of LCD interface and setup of SPLASH screen image */ -#include <common.h> #include <dm.h> #include <part.h> #include <video.h> @@ -335,7 +334,6 @@ static void mvebu_lcd_register_init(struct mvebu_lcd_info *lcd_info, */ writel(0x00000000, regs + MVEBU_LCD_SPU_SRAM_PARA1); - /* Clock settings in the at 01A8 and in the range F0A0 see below */ /* diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 515363f6a49..e72839cead4 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -4,7 +4,6 @@ * * Copyright (C) 2011-2013 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <clk.h> #include <dm.h> #include <env.h> @@ -336,7 +335,6 @@ static int mxs_video_probe(struct udevice *dev) mmu_set_region_dcache_behaviour(fb_start, fb_end - fb_start, DCACHE_WRITEBACK); video_set_flush_dcache(dev, true); - gd->fb_base = plat->base; return ret; } diff --git a/drivers/video/nexell/s5pxx18_dp.c b/drivers/video/nexell/s5pxx18_dp.c index 2248f479057..16a489b88dc 100644 --- a/drivers/video/nexell/s5pxx18_dp.c +++ b/drivers/video/nexell/s5pxx18_dp.c @@ -6,7 +6,6 @@ */ #include <config.h> -#include <common.h> #include <errno.h> #include <log.h> #include <asm/arch/reset.h> diff --git a/drivers/video/nexell/s5pxx18_dp_hdmi.c b/drivers/video/nexell/s5pxx18_dp_hdmi.c index 3f1fb8a5757..109d9f28bb0 100644 --- a/drivers/video/nexell/s5pxx18_dp_hdmi.c +++ b/drivers/video/nexell/s5pxx18_dp_hdmi.c @@ -6,7 +6,6 @@ */ #include <config.h> -#include <common.h> #include <errno.h> #include <log.h> diff --git a/drivers/video/nexell/s5pxx18_dp_lvds.c b/drivers/video/nexell/s5pxx18_dp_lvds.c index f8ea63fdf1b..5db8d2b73b1 100644 --- a/drivers/video/nexell/s5pxx18_dp_lvds.c +++ b/drivers/video/nexell/s5pxx18_dp_lvds.c @@ -6,8 +6,8 @@ */ #include <config.h> -#include <common.h> #include <errno.h> +#include <stdio.h> #include <asm/arch/nexell.h> #include <asm/arch/reset.h> diff --git a/drivers/video/nexell/s5pxx18_dp_mipi.c b/drivers/video/nexell/s5pxx18_dp_mipi.c index 670272b2680..58493a82598 100644 --- a/drivers/video/nexell/s5pxx18_dp_mipi.c +++ b/drivers/video/nexell/s5pxx18_dp_mipi.c @@ -6,7 +6,6 @@ */ #include <config.h> -#include <common.h> #include <errno.h> #include <asm/arch/nexell.h> diff --git a/drivers/video/nexell/s5pxx18_dp_rgb.c b/drivers/video/nexell/s5pxx18_dp_rgb.c index 44e8edb02a2..6abb8b5e216 100644 --- a/drivers/video/nexell/s5pxx18_dp_rgb.c +++ b/drivers/video/nexell/s5pxx18_dp_rgb.c @@ -6,8 +6,8 @@ */ #include <config.h> -#include <common.h> #include <errno.h> +#include <stdio.h> #include <asm/arch/display.h> diff --git a/drivers/video/nexell/soc/s5pxx18_soc_disptop.h b/drivers/video/nexell/soc/s5pxx18_soc_disptop.h index c7bf5043e60..4ad353256eb 100644 --- a/drivers/video/nexell/soc/s5pxx18_soc_disptop.h +++ b/drivers/video/nexell/soc/s5pxx18_soc_disptop.h @@ -8,6 +8,7 @@ #ifndef _S5PXX18_SOC_DISPTOP_H_ #define _S5PXX18_SOC_DISPTOP_H_ +#include <linux/types.h> #include "s5pxx18_soc_disptype.h" #define NUMBER_OF_DISPTOP_MODULE 1 diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c index af2698ffca8..7bda33fb16e 100644 --- a/drivers/video/nexell_display.c +++ b/drivers/video/nexell_display.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <command.h> #include <dm.h> #include <mapmem.h> diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c index 432b16bfbfe..0b7ce348d5a 100644 --- a/drivers/video/omap3_dss.c +++ b/drivers/video/omap3_dss.c @@ -25,7 +25,6 @@ * MA 02111-1307 USA */ -#include <common.h> #include <asm/io.h> #include <asm/arch/dss.h> diff --git a/drivers/video/orisetech_otm8009a.c b/drivers/video/orisetech_otm8009a.c index 848f174b6e4..a29e909decc 100644 --- a/drivers/video/orisetech_otm8009a.c +++ b/drivers/video/orisetech_otm8009a.c @@ -7,7 +7,6 @@ * This otm8009a panel driver is inspired from the Linux Kernel driver * drivers/gpu/drm/panel/panel-orisetech-otm8009a.c. */ -#include <common.h> #include <backlight.h> #include <dm.h> #include <mipi_dsi.h> diff --git a/drivers/video/panel-uclass.c b/drivers/video/panel-uclass.c index 1f7e20e0b50..52a3466dc8c 100644 --- a/drivers/video/panel-uclass.c +++ b/drivers/video/panel-uclass.c @@ -6,7 +6,6 @@ #define LOG_CATEGORY UCLASS_PANEL -#include <common.h> #include <dm.h> #include <panel.h> diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c index 1c747d98d7a..1470eaf4cab 100644 --- a/drivers/video/pwm_backlight.c +++ b/drivers/video/pwm_backlight.c @@ -6,7 +6,6 @@ #define LOG_CATEGORY UCLASS_PANEL_BACKLIGHT -#include <common.h> #include <dm.h> #include <backlight.h> #include <log.h> @@ -251,7 +250,6 @@ static int pwm_backlight_of_to_plat(struct udevice *dev) priv->cur_level = priv->default_level; log_debug("done\n"); - return 0; } diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c index f1fce55a2cb..b8662ca22bf 100644 --- a/drivers/video/raydium-rm68200.c +++ b/drivers/video/raydium-rm68200.c @@ -7,7 +7,6 @@ * This rm68200 panel driver is inspired from the Linux Kernel driver * drivers/gpu/drm/panel/panel-raydium-rm68200.c. */ -#include <common.h> #include <backlight.h> #include <dm.h> #include <mipi_dsi.h> diff --git a/drivers/video/renesas-r61307.c b/drivers/video/renesas-r61307.c index 3f5859055c9..a3697bce5ee 100644 --- a/drivers/video/renesas-r61307.c +++ b/drivers/video/renesas-r61307.c @@ -5,7 +5,6 @@ * Copyright (c) 2022 Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <backlight.h> #include <dm.h> #include <panel.h> diff --git a/drivers/video/renesas-r69328.c b/drivers/video/renesas-r69328.c index 082f5bc3d0a..9861c3fef11 100644 --- a/drivers/video/renesas-r69328.c +++ b/drivers/video/renesas-r69328.c @@ -5,7 +5,6 @@ * Copyright (c) 2022 Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <backlight.h> #include <dm.h> #include <panel.h> diff --git a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c index fb784636e87..fa512173510 100644 --- a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c +++ b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c @@ -24,7 +24,6 @@ #include <dm/lists.h> #include <linux/iopoll.h> -#include <common.h> #include <log.h> #include <video.h> #include <dm/device-internal.h> diff --git a/drivers/video/rockchip/rk3288_hdmi.c b/drivers/video/rockchip/rk3288_hdmi.c index efa87540340..3d39f31a5ad 100644 --- a/drivers/video/rockchip/rk3288_hdmi.c +++ b/drivers/video/rockchip/rk3288_hdmi.c @@ -3,7 +3,6 @@ * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c index 9d42119c826..850fe310754 100644 --- a/drivers/video/rockchip/rk3288_mipi.c +++ b/drivers/video/rockchip/rk3288_mipi.c @@ -4,7 +4,6 @@ * Author: Eric Gao <eric.gao@rock-chips.com> */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/rockchip/rk3288_vop.c b/drivers/video/rockchip/rk3288_vop.c index a4683852ea0..282831eaac4 100644 --- a/drivers/video/rockchip/rk3288_vop.c +++ b/drivers/video/rockchip/rk3288_vop.c @@ -5,7 +5,6 @@ * Copyright 2014 Rockchip Inc. */ -#include <common.h> #include <display.h> #include <dm.h> #include <regmap.h> diff --git a/drivers/video/rockchip/rk3399_hdmi.c b/drivers/video/rockchip/rk3399_hdmi.c index 5f3f5d26886..c7630ccf555 100644 --- a/drivers/video/rockchip/rk3399_hdmi.c +++ b/drivers/video/rockchip/rk3399_hdmi.c @@ -3,7 +3,6 @@ * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c index b62d8086674..57e36eed6a9 100644 --- a/drivers/video/rockchip/rk3399_mipi.c +++ b/drivers/video/rockchip/rk3399_mipi.c @@ -4,7 +4,6 @@ * Author: Eric Gao <eric.gao@rock-chips.com> */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/rockchip/rk3399_vop.c b/drivers/video/rockchip/rk3399_vop.c index cb589c7537e..17e1601e814 100644 --- a/drivers/video/rockchip/rk3399_vop.c +++ b/drivers/video/rockchip/rk3399_vop.c @@ -5,7 +5,6 @@ * Copyright 2014 Rockchip Inc. */ -#include <common.h> #include <display.h> #include <dm.h> #include <log.h> diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c index 5f68a610e4a..0ba68dbce3d 100644 --- a/drivers/video/rockchip/rk_edp.c +++ b/drivers/video/rockchip/rk_edp.c @@ -4,7 +4,6 @@ * Copyright 2014 Rockchip Inc. */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> @@ -73,7 +72,6 @@ static void rk_edp_init_refclk(struct rk3288_edp *regs, enum rockchip_dp_types c reg ^= REF_CLK_MASK; writel(reg, ®s->pll_reg_1); - writel(LDO_OUTPUT_V_SEL_145 | KVCO_DEFALUT | CHG_PUMP_CUR_SEL_5US | V2L_CUR_SEL_1MA, ®s->pll_reg_2); @@ -315,7 +313,6 @@ static int rk_edp_dpcd_write(struct rk3288_edp *regs, u32 addr, u8 *values, return rk_edp_dpcd_transfer(regs, addr, values, size, DPCD_WRITE); } - static int rk_edp_link_power_up(struct rk_edp_priv *edp) { u8 value; diff --git a/drivers/video/rockchip/rk_hdmi.c b/drivers/video/rockchip/rk_hdmi.c index d31f6a4ff81..0ac0a3a1ecd 100644 --- a/drivers/video/rockchip/rk_hdmi.c +++ b/drivers/video/rockchip/rk_hdmi.c @@ -5,7 +5,6 @@ * Copyright 2014 Rockchip Inc. */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c index d0a015e31ee..c969dae30b6 100644 --- a/drivers/video/rockchip/rk_lvds.c +++ b/drivers/video/rockchip/rk_lvds.c @@ -3,7 +3,6 @@ * Copyright 2016 Rockchip Inc. */ -#include <common.h> #include <display.h> #include <dm.h> #include <edid.h> diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c index f14cbc6dbf7..0a603083ba9 100644 --- a/drivers/video/rockchip/rk_mipi.c +++ b/drivers/video/rockchip/rk_mipi.c @@ -4,7 +4,6 @@ * Author: Eric Gao <eric.gao@rock-chips.com> */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/rockchip/rk_mipi.h b/drivers/video/rockchip/rk_mipi.h index 3d1e440b0ec..0d75a263e45 100644 --- a/drivers/video/rockchip/rk_mipi.h +++ b/drivers/video/rockchip/rk_mipi.h @@ -28,5 +28,4 @@ int rk_mipi_dsi_enable(struct udevice *dev, int rk_mipi_phy_enable(struct udevice *dev); - #endif diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index acc02e5d7c7..17dfe62c9da 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -4,7 +4,6 @@ * Copyright 2014 Rockchip Inc. */ -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/sandbox_dsi_host.c b/drivers/video/sandbox_dsi_host.c index c84a27ee3be..7025ac986e3 100644 --- a/drivers/video/sandbox_dsi_host.c +++ b/drivers/video/sandbox_dsi_host.c @@ -3,7 +3,6 @@ * Copyright (C) 2019, STMicroelectronics - All Rights Reserved */ -#include <common.h> #include <display.h> #include <dm.h> #include <dsi_host.h> diff --git a/drivers/video/sandbox_osd.c b/drivers/video/sandbox_osd.c index 2a854d3958b..bedc32b7c80 100644 --- a/drivers/video/sandbox_osd.c +++ b/drivers/video/sandbox_osd.c @@ -3,7 +3,6 @@ * (C) Copyright 2018 * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc */ -#include <common.h> #include <display.h> #include <dm.h> #include <malloc.h> diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c index 9081c7da62e..69dfa930273 100644 --- a/drivers/video/sandbox_sdl.c +++ b/drivers/video/sandbox_sdl.c @@ -3,7 +3,6 @@ * Copyright (c) 2013 Google, Inc */ -#include <common.h> #include <dm.h> #include <fdtdec.h> #include <log.h> diff --git a/drivers/video/seps525.c b/drivers/video/seps525.c index 74c8721e1e1..86cd301c4b9 100644 --- a/drivers/video/seps525.c +++ b/drivers/video/seps525.c @@ -6,7 +6,6 @@ * Copyright (C) 2020 Xilinx Inc. */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <dm.h> diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c index 76a30427a59..b6c5b058b2e 100644 --- a/drivers/video/simple_panel.c +++ b/drivers/video/simple_panel.c @@ -4,7 +4,6 @@ * Written by Simon Glass <sjg@chromium.org> */ -#include <common.h> #include <backlight.h> #include <dm.h> #include <edid.h> diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c index 33bb78bc3a3..cb518b149cb 100644 --- a/drivers/video/simplefb.c +++ b/drivers/video/simplefb.c @@ -3,7 +3,6 @@ * (C) Copyright 2017 Rob Clark */ -#include <common.h> #include <dm.h> #include <fdtdec.h> #include <fdt_support.h> diff --git a/drivers/video/ssd2828.c b/drivers/video/ssd2828.c index 948f5e74d0f..4334bbd7235 100644 --- a/drivers/video/ssd2828.c +++ b/drivers/video/ssd2828.c @@ -9,7 +9,6 @@ * interface for driving a MIPI compatible TFT display. */ -#include <common.h> #include <malloc.h> #include <mipi_display.h> #include <asm/gpio.h> diff --git a/drivers/video/stb_truetype.h b/drivers/video/stb_truetype.h index c6973bb353c..32a7b6e1dc0 100644 --- a/drivers/video/stb_truetype.h +++ b/drivers/video/stb_truetype.h @@ -412,7 +412,6 @@ int main(int arg, char **argv) } #endif - ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// //// @@ -564,7 +563,6 @@ STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int p STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap); // Query the font vertical metrics without having to create a font first. - ////////////////////////////////////////////////////////////////////////////// // // NEW TEXTURE BAKING API @@ -737,7 +735,6 @@ STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, in // need to do anything special to free it, because the contents are pure // value data with no additional data structures. Returns 0 on failure. - ////////////////////////////////////////////////////////////////////////////// // // CHARACTER TO GLYPH-INDEX CONVERSIOn @@ -749,7 +746,6 @@ STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codep // codepoint-based functions. // Returns 0 if the character codepoint is not defined in the font. - ////////////////////////////////////////////////////////////////////////////// // // CHARACTER PROPERTIES @@ -919,7 +915,6 @@ STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info STBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1); STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1); - // @TODO: don't expose this structure typedef struct { @@ -994,8 +989,6 @@ STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, floa // The algorithm has not been optimized at all, so expect it to be slow // if computing lots of characters or very large sizes. - - ////////////////////////////////////////////////////////////////////////////// // // Finding the right font... @@ -1017,7 +1010,6 @@ STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, floa // from the file yourself and do your own comparisons on them. // You have to have called stbtt_InitFont() first. - STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags); // returns the offset (not index) of the font that matches, or -1 if none // if you use STBTT_MACSTYLE_DONTCARE, use a font name like "Arial Bold". @@ -2809,7 +2801,6 @@ typedef struct stbtt__edge { int invert; } stbtt__edge; - typedef struct stbtt__active_edge { struct stbtt__active_edge *next; @@ -4970,7 +4961,6 @@ STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const #endif // STB_TRUETYPE_IMPLEMENTATION - // FULL VERSION HISTORY // // 1.25 (2021-07-11) many fixes diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c index a18c1e027a8..438ed41e8d5 100644 --- a/drivers/video/stm32/stm32_dsi.c +++ b/drivers/video/stm32/stm32_dsi.c @@ -10,7 +10,6 @@ #define LOG_CATEGORY UCLASS_VIDEO_BRIDGE -#include <common.h> #include <clk.h> #include <dm.h> #include <dsi_host.h> diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c index 4f60ba8ebee..0a062c8939d 100644 --- a/drivers/video/stm32/stm32_ltdc.c +++ b/drivers/video/stm32/stm32_ltdc.c @@ -7,7 +7,6 @@ #define LOG_CATEGORY UCLASS_VIDEO -#include <common.h> #include <clk.h> #include <display.h> #include <dm.h> diff --git a/drivers/video/sunxi/lcdc.c b/drivers/video/sunxi/lcdc.c index 73033c3b858..264d775c125 100644 --- a/drivers/video/sunxi/lcdc.c +++ b/drivers/video/sunxi/lcdc.c @@ -7,7 +7,6 @@ * (C) Copyright 2017 Jernej Skrabec <jernej.skrabec@siol.net> */ -#include <common.h> #include <log.h> #include <linux/delay.h> diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c index e02d359cd25..154641b9a69 100644 --- a/drivers/video/sunxi/sunxi_de2.c +++ b/drivers/video/sunxi/sunxi_de2.c @@ -5,7 +5,6 @@ * (C) Copyright 2017 Jernej Skrabec <jernej.skrabec@siol.net> */ -#include <common.h> #include <display.h> #include <dm.h> #include <edid.h> diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c index 8da44a1bb6d..4a6a89ef9d2 100644 --- a/drivers/video/sunxi/sunxi_display.c +++ b/drivers/video/sunxi/sunxi_display.c @@ -6,7 +6,7 @@ * (C) Copyright 2014-2015 Hans de Goede <hdegoede@redhat.com> */ -#include <common.h> +#include <config.h> #include <display.h> #include <dm.h> #include <cpu_func.h> diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c index a5e8d39e98f..b9c03ea0386 100644 --- a/drivers/video/sunxi/sunxi_dw_hdmi.c +++ b/drivers/video/sunxi/sunxi_dw_hdmi.c @@ -6,7 +6,6 @@ */ #include <clk.h> -#include <common.h> #include <display.h> #include <dm.h> #include <dw_hdmi.h> diff --git a/drivers/video/sunxi/sunxi_lcd.c b/drivers/video/sunxi/sunxi_lcd.c index 7a01cc343ca..953233fcd68 100644 --- a/drivers/video/sunxi/sunxi_lcd.c +++ b/drivers/video/sunxi/sunxi_lcd.c @@ -5,7 +5,6 @@ * (C) Copyright 2017 Vasily Khoruzhick <anarsoul@gmail.com> */ -#include <common.h> #include <display.h> #include <log.h> #include <video_bridge.h> diff --git a/drivers/video/sunxi/tve_common.c b/drivers/video/sunxi/tve_common.c index 35251371d14..b3e9bd98ef1 100644 --- a/drivers/video/sunxi/tve_common.c +++ b/drivers/video/sunxi/tve_common.c @@ -7,8 +7,6 @@ * (C) Copyright 2017 Jernej Skrabec <jernej.skrabec@siol.net> */ -#include <common.h> - #include <asm/arch/tve.h> #include <asm/io.h> diff --git a/drivers/video/tda19988.c b/drivers/video/tda19988.c index 24487439045..ebc8521c6ed 100644 --- a/drivers/video/tda19988.c +++ b/drivers/video/tda19988.c @@ -5,7 +5,6 @@ * Based on the Linux driver, (C) 2012 Texas Instruments */ -#include <common.h> #include <dm.h> #include <display.h> #include <i2c.h> diff --git a/drivers/video/tdo-tl070wsh30.c b/drivers/video/tdo-tl070wsh30.c index 273672db024..d772958f46e 100644 --- a/drivers/video/tdo-tl070wsh30.c +++ b/drivers/video/tdo-tl070wsh30.c @@ -3,7 +3,6 @@ * Copyright (C) 2020 BayLibre, SAS * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <backlight.h> #include <dm.h> #include <mipi_dsi.h> diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c index 9261cc9384a..abe31e27d84 100644 --- a/drivers/video/tegra124/display.c +++ b/drivers/video/tegra124/display.c @@ -5,7 +5,6 @@ * Extracted from Chromium coreboot commit 3f59b13d */ -#include <common.h> #include <bootstage.h> #include <dm.h> #include <edid.h> @@ -14,6 +13,7 @@ #include <edid.h> #include <log.h> #include <part.h> +#include <time.h> #include <video.h> #include <asm/gpio.h> #include <asm/io.h> diff --git a/drivers/video/tegra124/dp.c b/drivers/video/tegra124/dp.c index b27b1633bab..b95b14da77d 100644 --- a/drivers/video/tegra124/dp.c +++ b/drivers/video/tegra124/dp.c @@ -4,12 +4,12 @@ * Copyright 2014 Google Inc. */ -#include <common.h> #include <display.h> #include <dm.h> #include <div64.h> #include <errno.h> #include <log.h> +#include <time.h> #include <video_bridge.h> #include <asm/io.h> #include <asm/arch-tegra/dc.h> @@ -627,7 +627,6 @@ static int tegra_dc_dp_calc_config(struct tegra_dp_priv *dp, if (link_cfg->hblank_sym < 0) link_cfg->hblank_sym = 0; - /* * Refer to dev_disp.ref for more information. * # symbols/vblank = ((SetRasterBlankStart.X - diff --git a/drivers/video/tegra124/sor.c b/drivers/video/tegra124/sor.c index 258685182c7..1ce5330c6bc 100644 --- a/drivers/video/tegra124/sor.c +++ b/drivers/video/tegra124/sor.c @@ -3,7 +3,6 @@ * Copyright (c) 2011-2013, NVIDIA Corporation. */ -#include <common.h> #include <dm.h> #include <errno.h> #include <log.h> diff --git a/drivers/video/tegra20/mipi-phy.c b/drivers/video/tegra20/mipi-phy.c index c3ebc4074b5..576262e405d 100644 --- a/drivers/video/tegra20/mipi-phy.c +++ b/drivers/video/tegra20/mipi-phy.c @@ -3,7 +3,6 @@ * Copyright (C) 2013 NVIDIA Corporation */ -#include <common.h> #include <linux/err.h> #include "mipi-phy.h" diff --git a/drivers/video/tegra20/tegra-dc.c b/drivers/video/tegra20/tegra-dc.c index d073da7d7d4..accabbf4dbb 100644 --- a/drivers/video/tegra20/tegra-dc.c +++ b/drivers/video/tegra20/tegra-dc.c @@ -49,7 +49,7 @@ struct tegra_lcd_priv { int dc_clk[2]; /* Contains clk and its parent */ ulong scdiv; /* Clock divider used by disp_clk_ctrl */ bool rotation; /* 180 degree panel turn */ - bool pipe; /* DC controller: 0 for A, 1 for B */ + int pipe; /* DC controller: 0 for A, 1 for B */ }; enum { @@ -461,9 +461,7 @@ static int tegra_lcd_of_to_plat(struct udevice *dev) } priv->rotation = dev_read_bool(dev, "nvidia,180-rotation"); - - if (!strcmp(dev->name, TEGRA_DC_B)) - priv->pipe = 1; + priv->pipe = dev_read_u32_default(dev, "nvidia,head", 0); rgb = fdt_subnode_offset(blob, node, "rgb"); if (rgb < 0) { diff --git a/drivers/video/tegra20/tegra-dc.h b/drivers/video/tegra20/tegra-dc.h index 05042dab1c6..7d0c189ec80 100644 --- a/drivers/video/tegra20/tegra-dc.h +++ b/drivers/video/tegra20/tegra-dc.h @@ -14,15 +14,13 @@ /* arch-tegra/dc exists only because T124 uses it */ #include <asm/arch-tegra/dc.h> -#define TEGRA_DC_A "dc@54200000" -#define TEGRA_DC_B "dc@54240000" #define TEGRA_DSI_A "dsi@54300000" #define TEGRA_DSI_B "dsi@54400000" struct tegra_dc_plat { struct udevice *dev; /* Display controller device */ struct dc_ctlr *dc; /* Display controller regmap */ - bool pipe; /* DC number: 0 for A, 1 for B */ + int pipe; /* DC number: 0 for A, 1 for B */ ulong scdiv; /* Shift clock divider */ }; diff --git a/drivers/video/tegra20/tegra-dsi.c b/drivers/video/tegra20/tegra-dsi.c index 13dae37806f..35a8e6c176b 100644 --- a/drivers/video/tegra20/tegra-dsi.c +++ b/drivers/video/tegra20/tegra-dsi.c @@ -4,7 +4,6 @@ * Copyright (c) 2022 Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <dm.h> #include <log.h> #include <misc.h> diff --git a/drivers/video/tegra20/tegra-pwm-backlight.c b/drivers/video/tegra20/tegra-pwm-backlight.c index 5f93f57fe90..79d8a021a3a 100644 --- a/drivers/video/tegra20/tegra-pwm-backlight.c +++ b/drivers/video/tegra20/tegra-pwm-backlight.c @@ -6,7 +6,6 @@ #define LOG_CATEGORY UCLASS_PANEL_BACKLIGHT #include <backlight.h> -#include <common.h> #include <dm.h> #include <i2c.h> #include <log.h> diff --git a/drivers/video/ti/tilcdc-panel.c b/drivers/video/ti/tilcdc-panel.c index df95086a515..d4076523060 100644 --- a/drivers/video/ti/tilcdc-panel.c +++ b/drivers/video/ti/tilcdc-panel.c @@ -5,7 +5,6 @@ * Copyright (C) 2020 Dario Binacchi <dariobin@libero.it> */ -#include <common.h> #include <backlight.h> #include <clk.h> #include <display.h> diff --git a/drivers/video/ti/tilcdc.c b/drivers/video/ti/tilcdc.c index 2734754ecde..493e2f18cd2 100644 --- a/drivers/video/ti/tilcdc.c +++ b/drivers/video/ti/tilcdc.c @@ -3,7 +3,6 @@ * Copyright (C) 2020 Dario Binacchi <dariobin@libero.it> */ -#include <common.h> #include <clk.h> #include <dm.h> #include <dm/device_compat.h> diff --git a/drivers/video/tidss/tidss_drv.c b/drivers/video/tidss/tidss_drv.c index 1380c6b6937..865d4bddb7f 100644 --- a/drivers/video/tidss/tidss_drv.c +++ b/drivers/video/tidss/tidss_drv.c @@ -9,7 +9,6 @@ * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> */ -#include <common.h> #include <dm.h> #include <clk.h> #include <log.h> diff --git a/drivers/video/vesa.c b/drivers/video/vesa.c index 50912c5c8bc..ab756ac8ea1 100644 --- a/drivers/video/vesa.c +++ b/drivers/video/vesa.c @@ -3,7 +3,6 @@ * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> #include <dm.h> #include <log.h> #include <pci.h> diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index 5d06e51ff23..80e7adf6a1a 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -9,7 +9,6 @@ #define LOG_CATEGORY UCLASS_VIDEO_CONSOLE -#include <common.h> #include <abuf.h> #include <charset.h> #include <command.h> diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 7b5d1dfbb3b..41bb7647fda 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -5,10 +5,10 @@ #define LOG_CATEGORY UCLASS_VIDEO -#include <common.h> #include <bloblist.h> #include <console.h> #include <cpu_func.h> +#include <cyclic.h> #include <dm.h> #include <log.h> #include <malloc.h> @@ -53,6 +53,8 @@ */ DECLARE_GLOBAL_DATA_PTR; +struct cyclic_info; + /** * struct video_uc_priv - Information for the video uclass * @@ -61,9 +63,12 @@ DECLARE_GLOBAL_DATA_PTR; * available address to use for a device's framebuffer. It starts at * gd->video_top and works downwards, running out of space when it hits * gd->video_bottom. + * @cyc: handle for cyclic-execution function, or NULL if none */ struct video_uc_priv { ulong video_ptr; + bool cyc_active; + struct cyclic_info cyc; }; /** struct vid_rgb - Describes a video colour */ @@ -140,13 +145,26 @@ int video_reserve(ulong *addrp) *addrp -= CONFIG_VAL(VIDEO_PCI_DEFAULT_FB_SIZE); gd->video_bottom = *addrp; - gd->fb_base = *addrp; debug("Video frame buffers from %lx to %lx\n", gd->video_bottom, gd->video_top); return 0; } +ulong video_get_fb(void) +{ + struct udevice *dev; + + uclass_find_first_device(UCLASS_VIDEO, &dev); + if (dev) { + const struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev); + + return uc_plat->base; + } + + return 0; +} + int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, int yend, u32 colour) { @@ -205,7 +223,6 @@ int video_reserve_from_bloblist(struct video_handoff *ho) return -ENOENT; gd->video_bottom = ho->fb; - gd->fb_base = ho->fb; gd->video_top = ho->fb + ho->size; debug("%s: Reserving %lx bytes at %08x as per bloblist received\n", __func__, (unsigned long)ho->size, (u32)ho->fb); @@ -350,6 +367,7 @@ void video_set_default_colors(struct udevice *dev, bool invert) /* Flush video activity to the caches */ int video_sync(struct udevice *vid, bool force) { + struct video_priv *priv = dev_get_uclass_priv(vid); struct video_ops *ops = video_get_ops(vid); int ret; @@ -359,28 +377,26 @@ int video_sync(struct udevice *vid, bool force) return ret; } + if (CONFIG_IS_ENABLED(CYCLIC) && !force && + get_timer(priv->last_sync) < CONFIG_VIDEO_SYNC_MS) + return 0; + /* * flush_dcache_range() is declared in common.h but it seems that some * architectures do not actually implement it. Is there a way to find * out whether it exists? For now, ARM is safe. */ #if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) - struct video_priv *priv = dev_get_uclass_priv(vid); - if (priv->flush_dcache) { flush_dcache_range((ulong)priv->fb, ALIGN((ulong)priv->fb + priv->fb_size, CONFIG_SYS_CACHELINE_SIZE)); } #elif defined(CONFIG_VIDEO_SANDBOX_SDL) - struct video_priv *priv = dev_get_uclass_priv(vid); - static ulong last_sync; - - if (force || get_timer(last_sync) > 100) { - sandbox_sdl_sync(priv->fb); - last_sync = get_timer(0); - } + sandbox_sdl_sync(priv->fb); #endif + priv->last_sync = get_timer(0); + return 0; } @@ -529,10 +545,16 @@ int video_default_font_height(struct udevice *dev) return vc_priv->y_charsize; } +static void video_idle(struct cyclic_info *cyc) +{ + video_sync_all(); +} + /* Set up the display ready for use */ static int video_post_probe(struct udevice *dev) { struct video_uc_plat *plat = dev_get_uclass_plat(dev); + struct video_uc_priv *uc_priv = uclass_get_priv(dev->uclass); struct video_priv *priv = dev_get_uclass_priv(dev); char name[30], drv[15], *str; const char *drv_name = drv; @@ -623,6 +645,16 @@ static int video_post_probe(struct udevice *dev) } } + /* register cyclic as soon as the first video device is probed */ + if (CONFIG_IS_ENABLED(CYCLIC) && (gd->flags && GD_FLG_RELOC) && + !uc_priv->cyc_active) { + uint ms = CONFIG_IF_ENABLED_INT(CYCLIC, VIDEO_SYNC_CYCLIC_MS); + + cyclic_register(&uc_priv->cyc, video_idle, ms * 1000, + "video_init"); + uc_priv->cyc_active = true; + } + return 0; }; @@ -662,6 +694,18 @@ static int video_post_bind(struct udevice *dev) return 0; } +__maybe_unused static int video_destroy(struct uclass *uc) +{ + struct video_uc_priv *uc_priv = uclass_get_priv(uc); + + if (uc_priv->cyc_active) { + cyclic_unregister(&uc_priv->cyc); + uc_priv->cyc_active = false; + } + + return 0; +} + UCLASS_DRIVER(video) = { .id = UCLASS_VIDEO, .name = "video", @@ -671,4 +715,5 @@ UCLASS_DRIVER(video) = { .priv_auto = sizeof(struct video_uc_priv), .per_device_auto = sizeof(struct video_priv), .per_device_plat_auto = sizeof(struct video_uc_plat), + CONFIG_IS_ENABLED(CYCLIC, (.destroy = video_destroy, )) }; diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c index 45f003c8251..ad512d99a1b 100644 --- a/drivers/video/video_bmp.c +++ b/drivers/video/video_bmp.c @@ -3,7 +3,6 @@ * Copyright (c) 2015 Google, Inc */ -#include <common.h> #include <bmp_layout.h> #include <dm.h> #include <log.h> diff --git a/drivers/video/video_osd-uclass.c b/drivers/video/video_osd-uclass.c index 0d3aae4d827..923686345ff 100644 --- a/drivers/video/video_osd-uclass.c +++ b/drivers/video/video_osd-uclass.c @@ -6,7 +6,6 @@ #define LOG_CATEGORY UCLASS_VIDEO_OSD -#include <common.h> #include <dm.h> #include <video_osd.h> diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c index 35955a5df7d..d86d8679841 100644 --- a/drivers/video/videomodes.c +++ b/drivers/video/videomodes.c @@ -55,7 +55,6 @@ "myvideo" and setting the variable "videomode=myvideo".. ****************************************************************************/ -#include <common.h> #include <edid.h> #include <env.h> #include <errno.h> diff --git a/drivers/video/videomodes.h b/drivers/video/videomodes.h index 405f4e1fc2c..3c9638670f1 100644 --- a/drivers/video/videomodes.h +++ b/drivers/video/videomodes.h @@ -24,7 +24,6 @@ #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ - /****************************************************************** * Resolution Struct ******************************************************************/ diff --git a/drivers/video/zynqmp/zynqmp_dpsub.c b/drivers/video/zynqmp/zynqmp_dpsub.c index def4dcf6261..76abfeac443 100644 --- a/drivers/video/zynqmp/zynqmp_dpsub.c +++ b/drivers/video/zynqmp/zynqmp_dpsub.c @@ -6,7 +6,6 @@ * Xilinx displayport(DP) Tx Subsytem driver */ -#include <common.h> #include <clk.h> #include <cpu_func.h> #include <dm.h> @@ -50,7 +49,7 @@ static void dma_init_video_descriptor(struct udevice *dev) DPDMA_DESCRIPTOR_ADDR_EXT_SRC_ADDR_EXT_SHIFT) | (upper_32_bits((u64)&cur_desc))); cur_desc.next_desr = lower_32_bits((u64)&cur_desc); - cur_desc.src_addr = lower_32_bits((u64)gd->fb_base); + cur_desc.src_addr = lower_32_bits((u64)video_get_fb()); } static void dma_set_descriptor_address(struct udevice *dev) @@ -2135,7 +2134,6 @@ static int zynqmp_dpsub_probe(struct udevice *dev) dev_dbg(dev, "BPP in bits %d, bpix %d\n", priv->non_live_graphics->bpp, uc_priv->bpix); - uc_priv->fb = (void *)gd->fb_base; uc_priv->xsize = vidc_video_timing_modes[priv->video_mode].video_timing.h_active; uc_priv->ysize = vidc_video_timing_modes[priv->video_mode].video_timing.v_active; /* Calculated by core but need it for my own setup */ |