From patchwork Fri Sep 19 20:14:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 376 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=1758313041; bh=uRdKjbkrdTFy+Pm5G1AlncJM6pHZNBp36bZEK7K+6DI=; 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=Xmy5LSk/rWgRuVAnYflASI+sn/BRpUkyJCUELqjZJaH9Anu3Yp7lndAmuYM9kPQkw bIzgfmJwdsvh1yRqG0BB7MusxPu6SiUFhcwh1VS9Fnwq8xo8mJqdzi48XcNwUn+ouG xpvBqDh0zZP2QCXXKcyxP+fjJ25JPEFWU6IIXS4Rn1QQ0Ee4VtXB8cHr0+deGUj/Dc yP7ETgd2QNnX1IYUxxFbVBldLnfBvF2/bYi4gakPyXxdopX3fHzZ7RN17UWouuL+Ok OlzxPXpj7KVwS4ihCxkdEYnvIWlY8yduD7vQRCEylQS+S3jBtBZHaURA8JnHnWJDSi VO0avwzjzV2kA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D6EA367C74 for ; Fri, 19 Sep 2025 14:17:21 -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 LRvbWzV3wBSi for ; Fri, 19 Sep 2025 14:17:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758313041; bh=uRdKjbkrdTFy+Pm5G1AlncJM6pHZNBp36bZEK7K+6DI=; 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=Xmy5LSk/rWgRuVAnYflASI+sn/BRpUkyJCUELqjZJaH9Anu3Yp7lndAmuYM9kPQkw bIzgfmJwdsvh1yRqG0BB7MusxPu6SiUFhcwh1VS9Fnwq8xo8mJqdzi48XcNwUn+ouG xpvBqDh0zZP2QCXXKcyxP+fjJ25JPEFWU6IIXS4Rn1QQ0Ee4VtXB8cHr0+deGUj/Dc yP7ETgd2QNnX1IYUxxFbVBldLnfBvF2/bYi4gakPyXxdopX3fHzZ7RN17UWouuL+Ok OlzxPXpj7KVwS4ihCxkdEYnvIWlY8yduD7vQRCEylQS+S3jBtBZHaURA8JnHnWJDSi VO0avwzjzV2kA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C498B67B3B for ; Fri, 19 Sep 2025 14:17:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758313039; bh=i+AY4z8B24oZaIT8zhIjE8VMOxEFjgis2JpiUDBMLg0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oup9aPanmNhEKshkuBnr6TFhKPFJP0QubKvATOTp8jZ6W1gS2ijHUGmhvoKhZj5WW ZlTZrTejiRO98qioBC7tqwgeZTpWvSl/P/TLj0zjGEq9gcYiz+FNd+cBzJf8Fwl/Wv zr7//mPslFSxIun1483Kxtk9sDZug2LfK5ceVA9YSodfHQdiK0FwY0oKAuAxPcRa/H JMH2Jv/H7mfkJ2kgDaxKdSCXjC9bEfeG5OqNGTaZWErIRMD95KD0AXEv7pOoHFT+ex Q/EnRiCKP5ZJTSvGL5PdyBY5nCKS4MZutuuhDa0I5IQtcVCUVtc8TL7jtTEB+fCw5D Cuvp4u7O8i2ew== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1D76D67C0E; Fri, 19 Sep 2025 14:17:19 -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 axAJCbYkBAqD; Fri, 19 Sep 2025 14:17:19 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758313032; bh=LaxOfUkqo5djV9zbifQ+xFJn9TOfI4B69vkt+/ZIfPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EbkbEH9TYC7rvLRYsG5Vly19qXEu/OaJQNSNIkSg9bL0D95OUUhGDEkbSmYPdu/K2 zsDaF2ZK2w3tfK3OsDV14acqATwxy4dae1XJrshZWdmBzwcPZVgFyFWfXl/S+Vw8Xp SBz7vj0CFjkNehSqUpn1b22dgyuVy/AaxEmDjwdJijbACpJaFam8jaT5h7aD61Icrp aGMKn6KvzHnVTgUoXqDEktgG7l3wA2AFv39Y8YUWIH1nqhlSx01zqqQrMVcvaQ+fu1 wjcYKQ3jVhwgjPc9MfKX22QLxTO3PZey1tJpt7UVLVdl+GSaJ7UDv8CL89bCoAM/e5 5ALPldRSPQ1hg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5EA0467B3B; Fri, 19 Sep 2025 14:17:12 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 19 Sep 2025 14:14:41 -0600 Message-ID: <20250919201507.4024144-35-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: C42ZOPYHVQE5XM36R5OQVXRNREXUSXXV X-Message-ID-Hash: C42ZOPYHVQE5XM36R5OQVXRNREXUSXXV 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 34/42] video: Drop extra parameters from vidconsole_show_cursor() 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 Now that both console drivers use the CLI index, we don't need the extra parameters for this. Drop them. Signed-off-by: Simon Glass --- boot/scene_textline.c | 3 +-- drivers/video/vidconsole-uclass.c | 4 ++-- include/video_console.h | 12 +++--------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/boot/scene_textline.c b/boot/scene_textline.c index 3d4269a8e05..7e01959c40d 100644 --- a/boot/scene_textline.c +++ b/boot/scene_textline.c @@ -214,8 +214,7 @@ int scene_textline_render_deps(struct scene *scn, if (ret) return log_msg_ret("sav", ret); - vidconsole_show_cursor(cons, txt->obj.bbox.x0, - txt->obj.bbox.y0, scn->cls.num); + vidconsole_show_cursor(cons); } return 0; diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index f62e34673db..15b62d160cd 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -712,7 +712,7 @@ int vidconsole_entry_restore(struct udevice *dev, struct abuf *buf) } #ifdef CONFIG_CURSOR -int vidconsole_show_cursor(struct udevice *dev, uint x, uint y, uint index) +int vidconsole_show_cursor(struct udevice *dev) { struct vidconsole_priv *priv = dev_get_uclass_priv(dev); struct vidconsole_ops *ops = vidconsole_get_ops(dev); @@ -747,7 +747,7 @@ int vidconsole_show_cursor(struct udevice *dev, uint x, uint y, uint index) curs->height); } - priv->curs.visible = true; + curs->visible = true; return 0; } diff --git a/include/video_console.h b/include/video_console.h index 669292c97d7..b40253b218d 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -451,17 +451,12 @@ int vidconsole_entry_restore(struct udevice *dev, struct abuf *buf); /** * vidconsole_show_cursor() - Show the cursor * - * Shows a cursor at the specified position. The position is passed in, but for - * the truetype console it is not actually used, since it tracks where the - * cursor must go. + * Shows a cursor at the current position. * * @dev: Console device to use - * @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_show_cursor(struct udevice *dev, uint x, uint y, uint index); +int vidconsole_show_cursor(struct udevice *dev); /** * vidconsole_readline_start() - Enable cursor for all video consoles @@ -481,8 +476,7 @@ void vidconsole_readline_start(bool indent); */ void vidconsole_readline_end(void); #else -static inline int vidconsole_show_cursor(struct udevice *dev, uint x, uint y, - uint index) +static inline int vidconsole_show_cursor(struct udevice *dev) { return 0; }