U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] video: Improve syncing performance with cyclic
@ 2023-12-02 15:33 Simon Glass
  2023-12-02 15:33 ` [PATCH v2 1/5] cyclic: Add a symbol for SPL Simon Glass
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Simon Glass @ 2023-12-02 15:33 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Heinrich Schuchardt, Anatolij Gustschin, Tom Rini, Simon Glass,
	Bin Meng, Devarsh Thakkar, Fabrice Gasnier, Harald Seiler,
	Marek Vasut, Nikhil M Jain, Patrick Delaunay, Rasmus Villemoes,
	Sean Anderson, Stefan Roese, Troy Kisky

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 workarounds 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 growth 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

Changes in v2:
- Add an SPL_CYCLIC symbol
- Add a lot more explanation about the header files
- Expand help for CONFIG_VIDEO
- Fix 'groth' and 'work-around' typos in cover letter

Simon Glass (5):
  cyclic: Add a symbol for SPL
  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                    |  9 ++++++
 common/Makefile                   |  2 +-
 drivers/serial/sandbox.c          |  2 --
 drivers/video/Kconfig             | 35 +++++++++++++++++++++
 drivers/video/video-uclass.c      | 52 +++++++++++++++++++++++++------
 drivers/watchdog/Kconfig          |  1 +
 include/asm-generic/global_data.h |  2 +-
 include/cyclic.h                  |  6 ++--
 include/video.h                   |  2 ++
 9 files changed, 96 insertions(+), 15 deletions(-)

-- 
2.43.0.rc2.451.g8631bc7472-goog


^ permalink raw reply	[flat|nested] 18+ messages in thread
* [PATCH v2 0/5] video: Improve syncing performance with cyclic
@ 2023-11-21  2:09 Simon Glass
  2023-11-21  2:09 ` [PATCH v2 1/5] cyclic: Add a symbol for SPL Simon Glass
  0 siblings, 1 reply; 18+ messages in thread
From: Simon Glass @ 2023-11-21  2:09 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Anatolij Gustschin, Heinrich Schuchardt, Simon Glass,
	Bin Meng, Devarsh Thakkar, Fabrice Gasnier, Harald Seiler,
	Marek Vasut, Nikhil M Jain, Patrick Delaunay, Sean Anderson,
	Stefan Roese, Troy Kisky

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 workarounds 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 growth 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

Changes in v2:
- Add an SPL_CYCLIC symbol
- Add a lot more explanation about the header files
- Expand help for CONFIG_VIDEO
- Fix 'groth' and 'work-around' typos in cover letter

Simon Glass (5):
  cyclic: Add a symbol for SPL
  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                    |  9 ++++++
 common/Makefile                   |  2 +-
 drivers/serial/sandbox.c          |  2 --
 drivers/video/Kconfig             | 35 +++++++++++++++++++++
 drivers/video/video-uclass.c      | 52 +++++++++++++++++++++++++------
 drivers/watchdog/Kconfig          |  1 +
 include/asm-generic/global_data.h |  2 +-
 include/cyclic.h                  |  6 ++--
 include/video.h                   |  2 ++
 9 files changed, 96 insertions(+), 15 deletions(-)

-- 
2.43.0.rc1.413.gea7ed67945-goog


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-12-13 22:23 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-02 15:33 [PATCH v2 0/5] video: Improve syncing performance with cyclic Simon Glass
2023-12-02 15:33 ` [PATCH v2 1/5] cyclic: Add a symbol for SPL Simon Glass
2023-12-04  7:28   ` Stefan Roese
2023-12-05 10:37   ` Devarsh Thakkar
2023-12-09 15:48   ` Tom Rini
2023-12-13 19:50     ` Simon Glass
2023-12-13 20:42       ` Tom Rini
2023-12-13 20:51         ` Simon Glass
2023-12-13 20:59           ` Tom Rini
2023-12-13 22:22             ` Simon Glass
2023-12-02 15:33 ` [PATCH v2 2/5] video: Move last_sync to private data Simon Glass
2023-12-02 15:33 ` [PATCH v2 3/5] video: Use cyclic to handle video sync Simon Glass
2023-12-02 15:33 ` [PATCH v2 4/5] sandbox: Increase cyclic CPU-time limit Simon Glass
2023-12-02 15:33 ` [PATCH v2 5/5] sandbox: Drop video-sync in serial driver Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2023-11-21  2:09 [PATCH v2 0/5] video: Improve syncing performance with cyclic Simon Glass
2023-11-21  2:09 ` [PATCH v2 1/5] cyclic: Add a symbol for SPL Simon Glass
2023-11-21 13:06   ` Tom Rini
2023-11-21 16:20     ` Simon Glass
2023-11-21 18:19       ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox