All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Simon Glass <sjg@chromium.org>, Bin Meng <bmeng.cn@gmail.com>,
	Anatolij Gustschin <agust@denx.de>
Subject: [PATCH v4 08/12] video: Drop unnecessary truetype operations from SPL
Date: Sun, 12 Nov 2023 13:02:45 -0700	[thread overview]
Message-ID: <20231112200255.172351-4-sjg@chromium.org> (raw)
In-Reply-To: <20231112200255.172351-1-sjg@chromium.org>

Saving and restoring entries is used for expo and for the command line,
which we don't use in SPL. Drop these methods.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---

(no changes since v3)

Changes in v3:
- Add new patch to drop unnecessary truetype operations from SPL

 drivers/video/console_truetype.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c
index 14fb81e9563c..602133575f8c 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <log.h>
 #include <malloc.h>
+#include <spl.h>
 #include <video.h>
 #include <video_console.h>
 
@@ -799,6 +800,9 @@ static int truetype_entry_save(struct udevice *dev, struct abuf *buf)
 	struct console_tt_store store;
 	const uint size = sizeof(store);
 
+	if (spl_phase() <= PHASE_SPL)
+		return -ENOSYS;
+
 	/*
 	 * store the whole priv structure as it is simpler that picking out
 	 * what we need
@@ -820,6 +824,9 @@ static int truetype_entry_restore(struct udevice *dev, struct abuf *buf)
 	struct console_tt_priv *priv = dev_get_priv(dev);
 	struct console_tt_store store;
 
+	if (spl_phase() <= PHASE_SPL)
+		return -ENOSYS;
+
 	memcpy(&store, abuf_data(buf), sizeof(store));
 
 	vc_priv->xcur_frac = store.cur.xpos_frac;
@@ -844,6 +851,9 @@ static int truetype_set_cursor_visible(struct udevice *dev, bool visible,
 	uint out, val;
 	int ret;
 
+	if (spl_phase() <= PHASE_SPL)
+		return -ENOSYS;
+
 	if (!visible)
 		return 0;
 
-- 
2.42.0.869.gea05f2083d-goog


  parent reply	other threads:[~2023-11-12 20:05 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-12 20:02 [PATCH v4 00/12] Resolve issues with booting distros on x86 Simon Glass
2023-11-12 20:02 ` [PATCH v4 01/12] efi: Correct handling of frame buffer Simon Glass
2023-11-12 20:02 ` [PATCH v4 02/12] bootstd: Refactor mmc prep to allow a different scan Simon Glass
2023-11-12 20:02 ` [PATCH v4 03/12] bootstd: Add a return code to bootflow menu Simon Glass
2023-11-12 20:02 ` [PATCH v4 04/12] x86: coreboot: Add a boot script Simon Glass
2023-11-12 20:02 ` [PATCH v4 05/12] usb: Avoid unbinding devices in use by bootflows Simon Glass
2023-11-12 20:27   ` Heinrich Schuchardt
2023-11-12 21:20     ` Simon Glass
2023-11-12 23:30       ` Heinrich Schuchardt
2023-11-15 15:50         ` Simon Glass
2023-11-15 16:23           ` Heinrich Schuchardt
2023-11-16  1:29             ` Heinrich Schuchardt
2023-11-16  1:42               ` Simon Glass
2023-11-16  2:01                 ` Heinrich Schuchardt
2023-11-16  2:35                   ` Simon Glass
2023-11-15 15:12   ` Shantur Rathore
2023-11-12 20:02 ` [PATCH v4 06/12] expo: Correct background colour Simon Glass
2023-11-12 20:02 ` [PATCH v4 07/12] video: Correct setting of cursor position Simon Glass
2023-11-12 20:31   ` Anatolij Gustschin
2023-11-12 20:02 ` Simon Glass [this message]
2023-11-12 20:34   ` [PATCH v4 08/12] video: Drop unnecessary truetype operations from SPL Anatolij Gustschin
2023-11-12 20:02 ` [PATCH v4 09/12] x86: Enable SSE in 64-bit mode Simon Glass
2023-11-13 22:08   ` Bin Meng
2023-11-13 22:28     ` Simon Glass
2023-11-13 22:59       ` Tom Rini
2023-11-13 23:46         ` Bin Meng
2023-11-13 23:52           ` Tom Rini
2023-11-14  1:49             ` Bin Meng
2023-11-14 16:22               ` Tom Rini
2023-11-15  0:44                 ` Bin Meng
2023-11-15  0:48                   ` Simon Glass
2023-11-15 15:46                     ` Mark Kettenis
2023-11-19 15:27                       ` Simon Glass
2023-11-15  1:38                   ` Tom Rini
2023-11-15  1:40   ` Tom Rini
2023-11-12 20:02 ` [PATCH v4 10/12] x86: coreboot: Enable truetype fonts Simon Glass
2023-11-12 20:02 ` [PATCH v4 11/12] x86: qemu: Expand ROM size Simon Glass
2023-11-12 20:02 ` [PATCH v4 12/12] x86: qemu: Enable truetype fonts 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=20231112200255.172351-4-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=agust@denx.de \
    --cc=bmeng.cn@gmail.com \
    --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.