All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v2 00/26] x86: video: Speed up the framebuffer
Date: Sun, 24 May 2020 19:48:37 -0600	[thread overview]
Message-ID: <20200525014904.115621-1-sjg@chromium.org> (raw)

Some architectures use a cached framebuffer and flush the cache as needed
so that changes are visible. This is supported by U-Boot.

However x86 uses an uncached framebuffer with a 'write-combining' feature
to speed up writes. Reads are permitted but they are extremely expensive.

Unfortunately, reading from the frame buffer is quite common, e.g. to
scroll it. This makes scrolling very slow.

This series adds a new feature which supports copying modified parts of
the frame buffer to the uncached hardware buffer. This speeds up scrolling
dramatically on x86 so the extra complexity cost seems worth it.

In an extreme case, the time to print the environment on minnowboard with
1280x1024 and CONFIG_CONSOLE_SCROLL_LINES disabled is reduced
significantly, from 13 seconds to 300ms.

Changes in v2:
- Simplify return sequence in vidconsole_memmove() since there is no logging

Simon Glass (26):
  x86: fsp: Reinit the FPU after FSP meminit
  console: Add a way to output to serial only
  video: Show an error when a vidconsole function fails
  sandbox: video: Allow selection of rotated console
  video: Split out expression parts into variables
  video: Adjust rotated console to start at right edge
  video: Drop unnecessary #ifdef around vid_console_color()
  video: Add a comment for struct video_uc_platdata
  video: Add support for copying to a hardware framebuffer
  video: Set up the copy framebuffer when enabled
  video: Clear the copy framebuffer when clearing the screen
  video: Add helpers for vidconsole for the copy framebuffer
  video: Update normal console to support copy buffer
  video: Update truetype console to support copy buffer
  video: Update rotated console to support copy buffer
  video: Update the copy framebuffer when writing bitmaps
  video: Add comments to struct sandbox_sdl_plat
  video: sandbox: Add support for the copy framebuffer
  video: pci: Set up the copy framebuffer
  x86: fsp: video: Allocate a frame buffer when needed
  video: Correctly handle multiple framebuffers
  x86: video: Support copy framebuffer with probed devices
  chromebook_samus: Enable the copy framebuffer
  chromebook_link: Enable the copy framebuffer
  minnowmax: Enable the copy framebuffer
  x86: minnowmax: Drop screen resolution to 1024x768

 arch/x86/cpu/i386/cpu.c            |   5 ++
 arch/x86/include/asm/u-boot-x86.h  |   8 +++
 arch/x86/lib/fsp/fsp_graphics.c    |  12 ++++
 arch/x86/lib/fsp2/fsp_meminit.c    |   1 +
 common/console.c                   |  28 ++++++--
 configs/chromebook_link_defconfig  |   2 +-
 configs/chromebook_samus_defconfig |   2 +-
 configs/minnowmax_defconfig        |   4 +-
 configs/sandbox_defconfig          |   1 +
 drivers/pci/pci_rom.c              |  22 +++++-
 drivers/video/Kconfig              |  31 +++++++++
 drivers/video/broadwell_igd.c      |  16 ++++-
 drivers/video/console_normal.c     |  26 +++++++-
 drivers/video/console_rotate.c     | 103 ++++++++++++++++++++---------
 drivers/video/console_truetype.c   |  43 ++++++++----
 drivers/video/ivybridge_igd.c      |  26 ++++++--
 drivers/video/sandbox_sdl.c        |  10 ++-
 drivers/video/vesa.c               |  30 ++++++++-
 drivers/video/vidconsole-uclass.c  |  40 ++++++++++-
 drivers/video/video-uclass.c       |  93 +++++++++++++++++++++++++-
 drivers/video/video_bmp.c          |  16 ++++-
 include/console.h                  |  13 ++++
 include/dm/test.h                  |  14 +++-
 include/video.h                    |  41 ++++++++++++
 include/video_console.h            |  51 +++++++++++++-
 test/dm/video.c                    |  60 ++++++++++-------
 26 files changed, 596 insertions(+), 102 deletions(-)

-- 
2.27.0.rc0.183.gde8f92d652-goog

             reply	other threads:[~2020-05-25  1:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25  1:48 Simon Glass [this message]
2020-05-25  1:48 ` [PATCH v2 01/26] x86: fsp: Reinit the FPU after FSP meminit Simon Glass
2020-05-25  1:48 ` [PATCH v2 02/26] console: Add a way to output to serial only Simon Glass
2020-05-25  1:48 ` [PATCH v2 03/26] video: Show an error when a vidconsole function fails Simon Glass
2020-05-25  1:48 ` [PATCH v2 04/26] sandbox: video: Allow selection of rotated console Simon Glass
2020-05-25  1:48 ` [PATCH v2 05/26] video: Split out expression parts into variables Simon Glass
2020-05-25  1:48 ` [PATCH v2 06/26] video: Adjust rotated console to start at right edge Simon Glass
2020-05-25  1:48 ` [PATCH v2 07/26] video: Drop unnecessary #ifdef around vid_console_color() Simon Glass
2020-05-25  1:48 ` [PATCH v2 08/26] video: Add a comment for struct video_uc_platdata Simon Glass
2020-05-25  1:48 ` [PATCH v2 09/26] video: Add support for copying to a hardware framebuffer Simon Glass
2020-05-25  1:48 ` [PATCH v2 10/26] video: Set up the copy framebuffer when enabled Simon Glass
2020-05-25  1:48 ` [PATCH v2 11/26] video: Clear the copy framebuffer when clearing the screen Simon Glass
2020-05-25  1:48 ` [PATCH v2 12/26] video: Add helpers for vidconsole for the copy framebuffer Simon Glass
2020-05-25  1:48 ` [PATCH v2 13/26] video: Update normal console to support copy buffer Simon Glass
2020-05-25  1:48 ` [PATCH v2 14/26] video: Update truetype " Simon Glass
2020-05-25  1:48 ` [PATCH v2 15/26] video: Update rotated " Simon Glass
2020-05-25  1:48 ` [PATCH v2 16/26] video: Update the copy framebuffer when writing bitmaps Simon Glass
2020-05-25  1:48 ` [PATCH v2 17/26] video: Add comments to struct sandbox_sdl_plat Simon Glass
2020-05-25  1:48 ` [PATCH v2 18/26] video: sandbox: Add support for the copy framebuffer Simon Glass
2020-05-25  1:48 ` [PATCH v2 19/26] video: pci: Set up " Simon Glass
2020-05-25  1:48 ` [PATCH v2 20/26] x86: fsp: video: Allocate a frame buffer when needed Simon Glass
2020-05-25  1:48 ` [PATCH v2 21/26] video: Correctly handle multiple framebuffers Simon Glass
2020-05-25  1:48 ` [PATCH v2 22/26] x86: video: Support copy framebuffer with probed devices Simon Glass
2020-05-25  1:49 ` [PATCH v2 23/26] chromebook_samus: Enable the copy framebuffer Simon Glass
2020-05-25  1:49 ` [PATCH v2 24/26] chromebook_link: " Simon Glass
2020-05-25  1:49 ` [PATCH v2 25/26] minnowmax: " Simon Glass
2020-05-25  1:49 ` [PATCH v2 26/26] x86: minnowmax: Drop screen resolution to 1024x768 Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200525014904.115621-1-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.