summaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)Author
2025-05-02video: Begin support for measuring multiple lines of textSimon Glass
Update the vidconsole API so that measure() can measure multiple lines of text. This will make it easier to implement multi-line fields in expo. Tidy up the function comments while we are here. Signed-off-by: Simon Glass <[email protected]>
2025-05-02video: Make white-on-black a video-device propertySimon Glass
The CONFIG_WHITE_ON_BLACK setting is hard-coded at build-time. It is useful to be able to control this when showing menus. Create a property to hold this information, using the CONFIG as the initial value. Signed-off-by: Simon Glass <[email protected]>
2025-05-01video: Enable VIDEO_DAMAGE for drivers that need itAlexander Graf
Some drivers call video_set_flush_dcache() to indicate that they want to have the dcache flushed for the frame buffer. These drivers benefit from our new video damage control, because we can reduce the amount of memory that gets flushed significantly. This patch enables video damage control for all device drivers that call video_set_flush_dcache() to make sure they benefit from it. Signed-off-by: Alexander Graf <[email protected]> [Alper: Add to VIDEO_TIDSS, imply instead of select] Co-developed-by: Alper Nebi Yasak <[email protected]> Signed-off-by: Alper Nebi Yasak <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2025-05-01video: Always compile cache flushing codeAlexander Graf
The dcache flushing code path was conditional on ARM && !DCACHE config options. However, dcaches exist on other platforms as well and may need clearing if their driver requires it. Simplify the compile logic and always enable the dcache flush logic in the video core. That way, drivers can always rely on it to call the arch specific callbacks. This will increase code size for non-ARM platforms with CONFIG_VIDEO=y slightly. Reported-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Alexander Graf <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/u-boot/[email protected]/ Added workaround for CONFIG_SYS_CACHELINE_SIZE for ibex-ast2700: Signed-off-by: Simon Glass <[email protected]>
2025-05-01video: Use VIDEO_DAMAGE for VIDEO_COPYAlexander Graf
CONFIG_VIDEO_COPY implemented a range-based copying mechanism: If we print a single character, it will always copy the full range of bytes from the top left corner of the character to the lower right onto the uncached frame buffer. This includes pretty much the full line contents of the printed character. Since we now have proper damage tracking, let's make use of that to reduce the amount of data we need to copy. With this patch applied, we will only copy the tiny rectangle surrounding characters when we print them, speeding up the video console. After this, changes to the main frame buffer are not immediately copied to the copy frame buffer, but postponed until the next video device sync. So issue an explicit sync before inspecting the copy frame buffer contents for the video tests. Signed-off-by: Alexander Graf <[email protected]> [Alper: Rebase for fontdata->height/w, fill_part(), fix memmove(dev), drop from defconfig, use damage.xstart/yend, use IS_ENABLED(), call video_sync() before copy_fb check, update video_copy test] Co-developed-by: Alper Nebi Yasak <[email protected]> Signed-off-by: Alper Nebi Yasak <[email protected]> Link: https://lore.kernel.org/u-boot/[email protected]/
2025-05-01video: Only dcache flush damaged linesAlexander Graf
Now that we have a damage area tells us which parts of the frame buffer actually need updating, let's only dcache flush those on video_sync() calls. With this optimization in place, frame buffer updates - especially on large screen such as 4k displays - speed up significantly. Signed-off-by: Alexander Graf <[email protected]> Reported-by: Da Xue <[email protected]> [Alper: Use damage.xstart/yend, IS_ENABLED()] Co-developed-by: Alper Nebi Yasak <[email protected]> Signed-off-by: Alper Nebi Yasak <[email protected]> Link: https://lore.kernel.org/u-boot/[email protected]/
2025-05-01video: Add damage notification on bmp displayAlexander Graf
Let's report the video damage when we draw a bitmap on the screen. This way we can later lazily flush only relevant regions to hardware. Signed-off-by: Alexander Graf <[email protected]> Reported-by: Da Xue <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/u-boot/[email protected]/
2025-05-01vidconsole: Add damage notifications to all vidconsole driversAlexander Graf
Now that we have a damage tracking API, let's populate damage done by vidconsole drivers. We try to declare as little memory as damaged as possible. Signed-off-by: Alexander Graf <[email protected]> Reported-by: Da Xue <[email protected]> [Alper: Rebase for met->baseline, fontdata->height/width, make rotated console_putc_xy() damages pass tests, edit patch message] Co-developed-by: Alper Nebi Yasak <[email protected]> Signed-off-by: Alper Nebi Yasak <[email protected]> Link: https://lore.kernel.org/u-boot/[email protected]/
2025-05-01dm: video: Add damage notification on display fillsAlexander Graf
Let's report the video damage when we fill parts of the screen. This way we can later lazily flush only relevant regions to hardware. Signed-off-by: Alexander Graf <[email protected]> Reported-by: Da Xue <[email protected]> [Alper: Move from video_clear() to video_fill(), video_fill_part()] Signed-off-by: Alper Nebi Yasak <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/u-boot/[email protected]/
2025-05-01dm: video: Add damage tracking APIAlexander Graf
We are going to introduce image damage tracking to fasten up screen refresh on large displays. This patch adds damage tracking for up to one rectangle of the screen which is typically enough to hold blt or text print updates. Callers into this API and a reduced dcache flush code path will follow in later patches. Signed-off-by: Alexander Graf <[email protected]> Reported-by: Da Xue <[email protected]> [Alper: Use xstart/yend, document new fields, return void from video_damage(), declare priv, drop headers, use IS_ENABLED()] Co-developed-by: Alper Nebi Yasak <[email protected]> Signed-off-by: Alper Nebi Yasak <[email protected]> Link: https://lore.kernel.org/u-boot/[email protected]/ Reviewed-by: Simon Glass <[email protected]>
2025-04-12video: backlight: add TI LM3532 led controllerSvyatoslav Ryhel
The LM3532 is a 500-kHz fixed frequency asynchronous boost converter which provides the power for 3 high-voltage, low-side current sinks. The device is programmable over an I2C-compatible interface and has independent current control for all three channels. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-04-12video: panel: add Motorola Atrix 4G and Droid X2 panelSvyatoslav Ryhel
Add support for the LCD panel module used in Motorola Atrix 4G or Droid X2. Exact panel vendor and model are unknown. The panel has a 540x960 (qHD) resolution and uses 24 bit RGB per pixel. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-04-12video: tegra: adjust DC and DSI config namesSvyatoslav Ryhel
Fix DC and DSI config names to reflect more generic nature of existing Tegra video drivers. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-04-12video: tegra: drop prefix from file namesSvyatoslav Ryhel
Dir name is enough. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-04-12video: move tegra124 into common tegra dirSvyatoslav Ryhel
Place Tegra124 SOR and eDP implenetation into common Tegra driver folder until it is integrated into existing setup. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-04-12video: rename tegra20 to tegraSvyatoslav Ryhel
Since this set of drivers suports four Tegra SoC generations, lets name it just 'tegra'. Signed-off-by: Svyatoslav Ryhel <[email protected]> Reviewed-by: Peter Robinson <[email protected]>
2025-04-12video: tegra20: dsi: add Tegra20 supportSvyatoslav Ryhel
Existing Tegra30 DSI configuration is fully compatible with Tegra20. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-04-11Merge patch series "Switch to using $(PHASE_) in Makefiles"Tom Rini
Tom Rini <[email protected]> says: This series switches to always using $(PHASE_) in Makefiles when building rather than $(PHASE_) or $(XPL_). It also starts on documenting this part of the build, but as a follow-up we need to rename doc/develop/spl.rst and expand on explaining things a bit. Link: https://lore.kernel.org/r/[email protected]
2025-04-11Kbuild: Always use $(PHASE_)Tom Rini
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our Makefiles as part of the macros to determine when to do something in our Makefiles based on what phase of the build we are in. For consistency, bring this down to a single macro and use "$(PHASE_)" only. Signed-off-by: Tom Rini <[email protected]>
2025-04-10video: imx: Add LCDIF driverMiquel Raynal
Add support for the LCD interfaces (LCDIF1/2). When probed, these interfaces request numerous clocks and power domains, attach the bridge and look for a panel in order to retrieve its capabilities and properties. There is a similar existing driver in the upper folder for other i.MX targets, I discovered this driver a bit late. It is not targeting the i.MX8MP and I have no idea how different can the LCDIF be on this SoC, but I did not manage to get it work, especially because it is not fully compliant with the device-model, especially on the clocks/power management side which is all ad-hoc. This is normal though, it was contributed more than ten years ago. Signed-off-by: Miquel Raynal <[email protected]>
2025-04-10video: imx: Add LDB driverMiquel Raynal
Add support for the LVDS Display Bridge (LDB) found on i.MX8MP. When attached, the bridge driver looks for panels connected to one of its two outputs and adapts its own configuration to use them. There is currently no support for merged/split displays. Note regarding the clock configuration: The LDB output clock should be absolutely identical to the LCDIF output clock so both blocks can talk to each other synchronously. However, the LDB clock has an internal divisor of 7 (respectively 3.5 in dual configuration) which means the LDB input clock must be explicitly set once we know the configuration. This driver was tested on i.MX8MP using a single panel connected to the LVDS2 interface. Signed-off-by: Miquel Raynal <[email protected]>
2025-04-10video: imx: Fix Makefile in order to be able to add other imx driversMiquel Raynal
The IPUv3 is one IP part of the imx world, there are others, and selecting the whole imx/ folder based on such a specific Kconfig symbol is sub-optimal. Let's always enter the imx/ folder, and then selectively compile parts of the folder based on the configuration. Signed-off-by: Miquel Raynal <[email protected]>
2025-04-08Merge patch series "Annotate switch/case fallthrough cases"Tom Rini
Andre Przywara <[email protected]> says: C's implicit fallthrough behaviour in switch/case statements can lead to subtle bugs. Quite some while ago many compilers introduced warnings in those cases, requiring intentional fallthrough's to be annotated. So far we were not enabling that compiler option, so many ambiguities and some bugs in the code went unnoticed. This series adds the required annotations in code paths that the first stage of the U-Boot CI covers. There is a large number of cases left in the libbz2 code. The usage of switch/case is borderline insane there, labels are hidden in macros, and there are no breaks, but just goto's. Upstream still uses very similar code, without any annotations. I still am not 100% sure those are meant to fall through or not, and plan to do further investigations, but didn't want to hold the rest of the patches back. You can see for yourself by applying patch 18/18 and building for sandbox64, for instance. Because of this we cannot quite enable the warning in the Makefile yet, but those fixes are worth regardless, and be it to increase readability. Please note that those patches do not fix anything, really, they just add those fallthrough annotations, so the series is not really critical. Link: https://lore.kernel.org/r/[email protected]
2025-04-08video: annotate switch/case fall-throughAndre Przywara
The generic DM video code uses an implicit switch/case fallthrough to provide fallback code paths when certain colour depths are not enabled. Add our "fallthrough;" statement-like macro to the video_fill() function to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2025-03-31video: ti: am335x: Fix tilcdc clock names.Sukrut Bellary
The commit 211b3d726378 ("arm: dts: am3x: Non-functional changes sync with v6.3-rc6") changed the tilcdc clock names. Fix the tilcdc driver to use the new clock names. Signed-off-by: Sukrut Bellary <[email protected]>
2025-03-26Merge branch 'staging' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-tegra into next - More Tegra video improvements
2025-03-19video: edid: guard standard timings EDID expansion behind kconfigSvyatoslav Ryhel
Since EDID only indicates supported standard timings, a large table with detailed timing information is necessary, consuming significant space. To mitigate this, the table is made configurable via kconfig, allowing it to be excluded when not needed. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-19video: backlight: lm3533: set up backlight according to device treeSvyatoslav Ryhel
Configure backlight lm3533 child according to device tree description. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-19video: backlight: lm3533: configure core in the probeSvyatoslav Ryhel
Configure core stuff in the probe. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-19video: backlight: lm3533: add more flexibility with device treeSvyatoslav Ryhel
Configure LM3533 based on preliminary device tree configuration. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-19video: sharp-lq101r1sx01: add missing LPM flagSvyatoslav Ryhel
Add missing MIPI_DSI_MODE_LPM mode flag. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-19video: samsung-ltl106hl02: add missing LPM flagSvyatoslav Ryhel
Add missing MIPI_DSI_MODE_LPM mode flag. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-19video: renesas-r69328: add power suppliesSvyatoslav Ryhel
Convert enable GPIO into a set of supplies. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-14common: console: Delete obsolete VIDCONSOLE_AS_{LCD, NAME} optionsDragan Simic
The configuration options CONFIG_VIDCONSOLE_AS_LCD and CONFIG_VIDCONSOLE_AS_ NAME have been marked as obsolete and scheduled for deletion in late 2020. That's already long overdue and the last remaining consumers of these options have already migrated to using "vidconsole" in their "stdout" and "stderr" environment variables, so let's delete these two configuration options. Signed-off-by: Dragan Simic <[email protected]> Acked-by: Soeren Moch <[email protected]> # tbs2910
2025-03-13video: renesas-r69328: fix reset gpio directionSvyatoslav Ryhel
The reset GPIO signal operates with a low-active logic. The driver needs to be adjusted to correctly handle this. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: renesas-r69328: add missing mode flagsSvyatoslav Ryhel
Add missing MIPI DSI mode flags. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: renesas-r61307: fix reset gpio directionSvyatoslav Ryhel
The reset GPIO signal operates with a low-active logic. The driver needs to be adjusted to correctly handle this. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: renesas-r61307: adjust compatibleSvyatoslav Ryhel
Vendor prefix of Hitachi should be "hit" to comply Linux vendor prefix list. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: renesas-r61307: add missing mode flagsSvyatoslav Ryhel
Add missing MIPI DSI mode flags. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: lg-ld070wx3: add missing LPM flagSvyatoslav Ryhel
Add missing MIPI_DSI_MODE_LPM mode flag. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: endeavoru-panel: add missing LPM flagSvyatoslav Ryhel
Add missing MIPI_DSI_MODE_LPM mode flag. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: endeavoru-panel: move backlight request after probeSvyatoslav Ryhel
Due to the use of the Tegra DC backlight feature by the HTC ONE X, backlight requests MUST NOT be made during probe or earlier. This is because it creates a loop, as the backlight is a DC child. To mitigate this issue, backlight requests can be made later, once the backlight is actively used. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: bridge: ssd2825: fix reset gpio directionSvyatoslav Ryhel
The reset GPIO signal operates with a low-active logic. The driver needs to be adjusted to correctly handle this. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: bridge: ssd2825: add power suppliesSvyatoslav Ryhel
Convert enable GPIO into a set of supplies according to datasheet. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: bridge: ssd2825: set default minimum tx_clkSvyatoslav Ryhel
If TX_CLK is not set or gives an error, use SSD2825_REF_MIN_CLK. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: bridge: ssd2825: make pixel format calculation more obviousSvyatoslav Ryhel
Use switch condition to get pixel format. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: bridge: ssd2825: add HS delays configurationSvyatoslav Ryhel
Set HS Zero and Prepare delays from device tree. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: bridge: ssd2825: move post configuration from transfer functionSvyatoslav Ryhel
Reconfigure post panel enable bridge configuration. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: bridge: ssd2825: convert to use of_graphSvyatoslav Ryhel
Use OF graph parsing helpers to get linked panel. Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-03-13video: bridge: ssd2825: convert to video bridge UCLASSSvyatoslav Ryhel
Switch from PANEL_UCLASS to VIDEO_BRIDGE_UCLASS since now its user has bridge support. Signed-off-by: Svyatoslav Ryhel <[email protected]>