[PATCH 0/5] video: Improve syncing performance with cyclic

Simon Glass sjg at chromium.org
Sun Nov 19 15:46:38 CET 2023


Now that U-Boot has a background-processing feature, it is possible to
reduce the amount of 'foreground' syncing of the display. At present
this happens quite often.

Foreground syncing blocks all other processing, sometimes for 10ms or
more. When pasting commands into U-Boot over the UART, this typically
result in characters being dropped. For example, on rpi_4 it isn't
possible to paste in more than 35 characters before things fail. This
makes updating the environment or entering long commands very painful
over the console, since text must be pasted in chunks, or the
vidconsole device must be dropped from stdout.

This series introduces background syncing, enabled by default for
boards which use video. The sync rates for foreground and background
are configurable.

With this series it is possible to paste in any amount of text to the
command line. Some sandbox-specific work-arounds can now be removed and
sandbox video (./u-boot -Dl) is significantly more responsive.

This obviously increases code size, since it enables a subsystem not
normally used by default. However it only applies to boards which have
VIDEO enabled, which are presumably less worried about memory space
since the video code is fairly large.

Also it is possible to disable CMD_CYCLIC and reduce the groth to:

   aarch64: (for 1/1 boards) all +1081.0 rodata +65.0 text +1016.0
       arm: (for 1/1 boards) all +945.0 rodata +65.0 text +880.0

Without that, the increase doubles.

It is of course possible to disable CYCLIC and still use VIDEO but this
reverts to the current behaviour


Simon Glass (5):
  cyclic: Disable in SPL builds
  video: Move last_sync to private data
  video: Use cyclic to handle video sync
  sandbox: Increase cyclic CPU-time limit
  sandbox: Drop video-sync in serial driver

 common/Kconfig               |  1 +
 common/Makefile              |  2 +-
 drivers/serial/sandbox.c     |  2 --
 drivers/video/Kconfig        | 30 +++++++++++++++++++++
 drivers/video/video-uclass.c | 52 +++++++++++++++++++++++++++++-------
 include/cyclic.h             |  6 +++--
 include/video.h              |  2 ++
 7 files changed, 81 insertions(+), 14 deletions(-)

-- 
2.43.0.rc0.421.g78406f8d94-goog



More information about the U-Boot mailing list