From patchwork Fri Sep 19 20:14:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 371 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758313025; bh=KtkL+1Cmq1ujrV+qU6MO/cZkL5sCZH5J8dt03z0PWWI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=hQR7CM01SRL2/CDUn9tP4e2P/UnD0+xJw0qEKh6nJ571ujfM8XNGUipfaxF/zggu5 TDHis9YdmExAwxkAfz+KBStBDOYnwnsus2B+zFlEznV62B07/ET6GVJv13czfH8Mb2 1C0n4INmJhMhAjxHvxCk7t1t4kHkgdV5SZk6gTOAHrNPbwiEDBoNfv1ODQeLj7gPNE l4K/TjuGkxbk4gmIMH64i42WotJ4rj6dkDFCI/Zxgq2Tv87ui5z8+YxxAbTrRmnuKZ DRNQwWmdTDh3S8k9QstmEGcLnrAcomMEBp/nvgq+PZ+Jf17dSl9zb2VcAsx7gtvMyk KCFcgrhq2S6Uw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5DCA567C81 for ; Fri, 19 Sep 2025 14:17:05 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id P9Hf9Dokb15p for ; Fri, 19 Sep 2025 14:17:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758313025; bh=KtkL+1Cmq1ujrV+qU6MO/cZkL5sCZH5J8dt03z0PWWI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=hQR7CM01SRL2/CDUn9tP4e2P/UnD0+xJw0qEKh6nJ571ujfM8XNGUipfaxF/zggu5 TDHis9YdmExAwxkAfz+KBStBDOYnwnsus2B+zFlEznV62B07/ET6GVJv13czfH8Mb2 1C0n4INmJhMhAjxHvxCk7t1t4kHkgdV5SZk6gTOAHrNPbwiEDBoNfv1ODQeLj7gPNE l4K/TjuGkxbk4gmIMH64i42WotJ4rj6dkDFCI/Zxgq2Tv87ui5z8+YxxAbTrRmnuKZ DRNQwWmdTDh3S8k9QstmEGcLnrAcomMEBp/nvgq+PZ+Jf17dSl9zb2VcAsx7gtvMyk KCFcgrhq2S6Uw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4E0C267B55 for ; Fri, 19 Sep 2025 14:17:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758313024; bh=bNv4J3anAnDHnGwL6gxyzHDVFFgSREKcd/SqaHvyugA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s8Iil0srWnUgZY7yqOdKcYztjzD/S86N4t4uZiS9Hx+BNXbmFZ+MAuDBMplyf2aEL F83BkOWzKUT9Ha4+Y1lfHlK8diW16GZ8EvQAxE/DCVyHRaGuW88bfgbU5LsrwrhEig ZelPIQIKxgg3ttDsI80oHCaOPpDNM+Ax5amzdD0kYXLYgorwBHwHtbk2zp1sWyY3y3 ahOF8EMSzKd29RhGW0yNpH8BE/zwzHgwsS/mE2GwY8P6UuW1Bjh/cHojdzFYyLiM/l Vsy6OolxtPZUI5PMYiJQ5RqwWfI5vb45FUoxWrMMoMtAbyOHoeBsEXsGn3jZ2A26mF 0NwP3LtAW1ysQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5414D67C6C; Fri, 19 Sep 2025 14:17:04 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id daO9eiiMNTNC; Fri, 19 Sep 2025 14:17:04 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758313019; bh=3SootGanyZc5ga1wUkgd7qn4T7b79ZSR+dYn8+N4SjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bMACCzHMIQxH9GlhWLzUQuYpeGrkj1O9jq066ifIsKgmeFrgUTbEf2ypyUx/XrTSX qlDOJLczkCxEWZty4feVU0y+N0Ke2//+fZn6tQd1obAc/oul+pOtkc33fiYncDHOEU pmR/YCJiOZR5lOrQ25o1I7JchBIZyNX11X8SF/m2paRok6TcNhL+MMEyHl89r6Jh4/ JL0xs9NZdq0SLgLPSc2oL8Fty+Yqmc/Grj6WmCpCetQmcR7Ba4vX/xGye8eBlfswdt recbRN2zIjOPdDFySSw6pslnuEjOTK7SmoPxW8rX4xrdIGTyV4L2MGvtYcOsj0T/ss JaY8AC4IB58qQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5B9A367A99; Fri, 19 Sep 2025 14:16:59 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 19 Sep 2025 14:14:36 -0600 Message-ID: <20250919201507.4024144-30-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250919201507.4024144-1-sjg@u-boot.org> References: <20250919201507.4024144-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TSWDYRJOU7D7SMJ36YM2O25UPCQU3VO4 X-Message-ID-Hash: TSWDYRJOU7D7SMJ36YM2O25UPCQU3VO4 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 29/42] video: Drop vidconsole_set_cursor_visible() List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass There is only one user of this function. Update it to use the new vidconsole_show_cursor() instead. Remove the now-unused vidconsole_set_cursor_visible() Signed-off-by: Simon Glass --- boot/scene_textline.c | 4 ++-- drivers/video/vidconsole-uclass.c | 13 ------------- include/video_console.h | 24 +----------------------- 3 files changed, 3 insertions(+), 38 deletions(-) diff --git a/boot/scene_textline.c b/boot/scene_textline.c index ba39cfb7cee..3d4269a8e05 100644 --- a/boot/scene_textline.c +++ b/boot/scene_textline.c @@ -214,8 +214,8 @@ int scene_textline_render_deps(struct scene *scn, if (ret) return log_msg_ret("sav", ret); - vidconsole_set_cursor_visible(cons, true, txt->obj.bbox.x0, - txt->obj.bbox.y0, scn->cls.num); + vidconsole_show_cursor(cons, txt->obj.bbox.x0, + txt->obj.bbox.y0, scn->cls.num); } return 0; diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index 9ab331af68a..65c912a4f6f 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -751,19 +751,6 @@ int vidconsole_show_cursor(struct udevice *dev, uint x, uint y, uint index) return 0; } -int vidconsole_set_cursor_visible(struct udevice *dev, bool visible, - uint x, uint y, uint index) -{ - if (visible) { - int ret; - - ret = vidconsole_show_cursor(dev, x, y, index); - if (ret) - return ret; - } - - return 0; -} #endif /* CONFIG_CURSOR */ int vidconsole_mark_start(struct udevice *dev) diff --git a/include/video_console.h b/include/video_console.h index af2b8499bb4..0b8742c5ee9 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -466,21 +466,6 @@ int vidconsole_entry_restore(struct udevice *dev, struct abuf *buf); */ int vidconsole_show_cursor(struct udevice *dev, uint x, uint y, uint index); -/** - * vidconsole_set_cursor_visible() - Show or hide the cursor - * - * Shows or hides a cursor at the current position - * - * @dev: Console device to use - * @visible: true to show the cursor, false to hide it - * @x: X position in pixels - * @y: Y position in pixels - * @index: Character position (0 = at start) - * Return: 0 if OK, -ve on error - */ -int vidconsole_set_cursor_visible(struct udevice *dev, bool visible, - uint x, uint y, uint index); - /** * vidconsole_readline_start() - Enable cursor for all video consoles * @@ -505,13 +490,6 @@ static inline int vidconsole_show_cursor(struct udevice *dev, uint x, uint y, return 0; } -static inline int vidconsole_set_cursor_visible(struct udevice *dev, - bool visible, uint x, uint y, - uint index) -{ - return 0; -} - static inline void vidconsole_readline_start(bool indent) { } @@ -519,7 +497,6 @@ static inline void vidconsole_readline_start(bool indent) static inline void vidconsole_readline_end(void) { } - #endif /* CONFIG_CURSOR */ static inline void cli_index_adjust(struct vidconsole_priv *priv, int by) @@ -529,6 +506,7 @@ static inline void cli_index_adjust(struct vidconsole_priv *priv, int by) } /** + * vidconsole_push_colour() - Temporarily change the font colour * * @dev: Device to adjust