All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH 06/17] video: Allow syncing the entire framebuffer to the copy
Date: Wed, 13 Jan 2021 20:29:46 -0700	[thread overview]
Message-ID: <20210114032957.483086-7-sjg@chromium.org> (raw)
In-Reply-To: <20210114032957.483086-1-sjg@chromium.org>

In some cases so much of the framebuffer is updated that it is not worth
copying the changes piece by piece to the copy framebuffer. Add a function
to copy the whole thing.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video-uclass.c | 10 ++++++++++
 include/video.h              | 14 ++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 8883e290357..8a832aef01a 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -275,6 +275,16 @@ int video_sync_copy(struct udevice *dev, void *from, void *to)
 
 	return 0;
 }
+
+int video_sync_copy_all(struct udevice *dev)
+{
+	struct video_priv *priv = dev_get_uclass_priv(dev);
+
+	video_sync_copy(dev, priv->fb, priv->fb + priv->fb_size);
+
+	return 0;
+}
+
 #endif
 
 /* Set up the colour map */
diff --git a/include/video.h b/include/video.h
index 7b7f62a8277..a63dbbd7df9 100644
--- a/include/video.h
+++ b/include/video.h
@@ -236,11 +236,25 @@ void video_set_default_colors(struct udevice *dev, bool invert);
  *	frame buffer start
  */
 int video_sync_copy(struct udevice *dev, void *from, void *to);
+
+/**
+ * video_sync_copy_all() - Sync the entire framebuffer to the copy
+ *
+ * @dev: Vidconsole device being updated
+ * @return 0 (always)
+ */
+int video_sync_copy_all(struct udevice *dev);
 #else
 static inline int video_sync_copy(struct udevice *dev, void *from, void *to)
 {
 	return 0;
 }
+
+static inline int video_sync_copy_all(struct udevice *dev)
+{
+	return 0;
+}
+
 #endif
 
 #ifndef CONFIG_DM_VIDEO
-- 
2.30.0.284.gd98b1dd5eaa7-goog

  parent reply	other threads:[~2021-01-14  3:29 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  3:29 [PATCH 00/17] Various minor clean-ups and improvements Simon Glass
2021-01-14  3:29 ` [PATCH 01/17] doc: Correct documentation for uclass_root Simon Glass
2021-01-14  3:29 ` [PATCH 02/17] spl: Add functions for next and previous phase Simon Glass
2021-01-28 23:57   ` Tom Rini
2021-01-14  3:29 ` [PATCH 03/17] bloblist: Support relocating to a larger space Simon Glass
2021-01-28 23:57   ` Tom Rini
2021-01-14  3:29 ` [PATCH 04/17] bloblist: Add missing tag names Simon Glass
2021-01-28 23:57   ` Tom Rini
2021-01-14  3:29 ` [PATCH 05/17] x86: tsc_timer: Correct overflow in __udelay() Simon Glass
2021-02-01  6:10   ` Bin Meng
2021-02-01  6:12     ` Bin Meng
2021-01-14  3:29 ` Simon Glass [this message]
2021-01-28 23:57   ` [PATCH 06/17] video: Allow syncing the entire framebuffer to the copy Tom Rini
2021-01-14  3:29 ` [PATCH 07/17] net: Use CONFIG_IS_ENABLED() in eth_dev_get_mac_address() Simon Glass
2021-01-28 23:57   ` Tom Rini
2021-01-14  3:29 ` [PATCH 08/17] fdtdec: Update the missing-devicetree message Simon Glass
2021-01-28 23:57   ` Tom Rini
2021-01-14  3:29 ` [PATCH 09/17] fdtdec: Use CONFIG_IS_ENABLED in board_fdt_blob_setup() Simon Glass
2021-01-28 23:58   ` Tom Rini
2021-02-14 18:50     ` Peter Robinson
2021-02-14 19:05       ` Jesper Schmitz Mouridsen
2021-02-14 19:08         ` Tom Rini
2021-02-14 19:10           ` Tom Rini
2021-02-14 19:20             ` Peter Robinson
2021-02-14 20:25               ` Tom Rini
2021-01-14  3:29 ` [PATCH 10/17] display_options: Use USE_TINY_PRINTF for SPL check Simon Glass
2021-01-28 23:58   ` Tom Rini
2021-01-14  3:29 ` [PATCH 11/17] uuid: Add a comment for UUID_STR_LEN Simon Glass
2021-01-28 23:58   ` Tom Rini
2021-01-14  3:29 ` [PATCH 12/17] mmc: pci_mmc: Only generate ACPI code for the SD card Simon Glass
2021-01-14 21:48   ` Jaehoon Chung
2021-01-28 23:58   ` Tom Rini
2021-01-14  3:29 ` [PATCH 13/17] x86: coral: Add a devicetree node for eMMC Simon Glass
2021-01-14 21:48   ` Jaehoon Chung
2021-02-01  6:11   ` Bin Meng
2021-02-01  6:13     ` Bin Meng
2021-01-14  3:29 ` [PATCH 14/17] mmc: pci_mmc: Set the removable flag Simon Glass
2021-01-14 21:48   ` Jaehoon Chung
2021-01-28 23:58   ` Tom Rini
2021-01-14  3:29 ` [PATCH 15/17] crc32: Exclude crc32 from TPL Simon Glass
2021-01-28 23:58   ` Tom Rini
2021-01-14  3:29 ` [PATCH 16/17] binman: Move selection of the binman node into a function Simon Glass
2021-01-28 23:58   ` Tom Rini
2021-01-14  3:29 ` [PATCH 17/17] binman: Allow reading entries from a subnode Simon Glass
2021-01-28 23:58   ` Tom Rini

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=20210114032957.483086-7-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.