From patchwork Fri Sep 19 20:14:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 361 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=1758312991; bh=oVrwAsombae6NCOHBsRbKr8N4GtmjVxLa6lVSE8RFgA=; 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=DgLii/XcLB5qnlrw8/jMwxEXGIDUE9K9/9hvmyD6zcBiM4fDe8wtjDcOMmGNXGMTN s/T2wkrv9RIUj5EZl9nzSMIeHh4ZGu99bQkJOpZr7wYEXMIoLVVmZpaPjh9eD8hKwd jaLvQzQ4nT/JX9g3mN4VA5OQJtC81Gkk5KvsCewjxYfAZ1swseJh7o03GBGZZiw5h9 fs0EJzbA6jgWZ6GKkVFRVBfCtxiDKZdrar7rfqWpjMir40HwNDk98ZYju/c4neWHut p2QOd6/rRIsm46anfPUMvUSsvoMd2N35a/+Q0OZba8NC/cJhyYSNk1LKWWTCg7Jqqm TzAq7yI/waZQw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C957A67C5B for ; Fri, 19 Sep 2025 14:16:31 -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 tfQFzaArFIl4 for ; Fri, 19 Sep 2025 14:16:31 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758312991; bh=oVrwAsombae6NCOHBsRbKr8N4GtmjVxLa6lVSE8RFgA=; 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=DgLii/XcLB5qnlrw8/jMwxEXGIDUE9K9/9hvmyD6zcBiM4fDe8wtjDcOMmGNXGMTN s/T2wkrv9RIUj5EZl9nzSMIeHh4ZGu99bQkJOpZr7wYEXMIoLVVmZpaPjh9eD8hKwd jaLvQzQ4nT/JX9g3mN4VA5OQJtC81Gkk5KvsCewjxYfAZ1swseJh7o03GBGZZiw5h9 fs0EJzbA6jgWZ6GKkVFRVBfCtxiDKZdrar7rfqWpjMir40HwNDk98ZYju/c4neWHut p2QOd6/rRIsm46anfPUMvUSsvoMd2N35a/+Q0OZba8NC/cJhyYSNk1LKWWTCg7Jqqm TzAq7yI/waZQw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B8F7A67BB6 for ; Fri, 19 Sep 2025 14:16:31 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758312989; bh=A2eLhe2XttH+PEvs3tgLS27TL0LWb346T4QtTBiDrAE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KmAHBbS43eL36E5q59RSGszW5SrEeVhrB6pCFoMc727PBD6eoIyYOwwNqi65m3M6Z jWwkVTAMfPf1oK0H4544W+nwg9vXqowagXr6734KEFntpgQPTwGnHbJ1HW5BO9jGAh zYFb7oFDr/w+xnv/ytxPxsg5TfNhR8AeBGf4jD8x213XVOjrTurwMJ0GJvNXR90zL+ zJAs/rxYKCd/HWoSnKMVwnI3yCysuToTKu4OfsMPf+VtQOk1ur44yICGaf8uDDSw5Y tfgBNvBWPWCQQZ+dQCYwU9BL+2FPae2d+CCQ4eI6yAmzdnUHs/vfBnzKm1fqcv2G/r GiOo1iIomvyrQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C5DD467BB6; Fri, 19 Sep 2025 14:16:29 -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 7hFgpzDO3-YC; Fri, 19 Sep 2025 14:16:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758312986; bh=Sxj5ZK5Pv8te8oJarveBcFUNAdtXbsfa7G9TKQgnlHE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ksMgqXezMiV0SuhGKT7ygOSUT6j4LDCYRhCmZKmuOODqaWTSipac/l8JzBjoupz1B enXEInYL8GOmdyYpLD2ZMp8Tj5cS59c6tnxHdHQ7mC96j98onrXo5ezG5o0mekKQMM yQoxOMUrTuoOJK28SN73n7MqjjGdsQh8ELQZQ7Ar6wFaAjL4/V/Nlyf3AkuhSEIS74 KVNgRUqany1engVMp2aKhQNl3bVJ4r1uMIt3D+1qirS4TfhZB3c94jT4ew2WDGrbyH gJz1AhJkO998a1Tmrg3HmS47TAbihzpqI9RNuaOxfah0EvhgKsHV/BvTtqrqWSkAmb MQSYzP8jbel1w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id CDD7967A99; Fri, 19 Sep 2025 14:16:25 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 19 Sep 2025 14:14:26 -0600 Message-ID: <20250919201507.4024144-20-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: KEVS2MQIFTDA3RALURAJ43NK5GLKWDO6 X-Message-ID-Hash: KEVS2MQIFTDA3RALURAJ43NK5GLKWDO6 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 19/42] video: Rename draw_cursor_vertically() to cursor_show() 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 For now the cursor is always vertical, so part of this name is redundant. Rename it to cursor_show(), which is what it does. We will eventually have a cursor_hide() to match it. Signed-off-by: Simon Glass --- drivers/video/console_core.c | 5 +++-- drivers/video/console_normal.c | 3 +-- drivers/video/console_truetype.c | 2 +- drivers/video/vidconsole_internal.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/video/console_core.c b/drivers/video/console_core.c index aec51dc809d..36e7f81dc0a 100644 --- a/drivers/video/console_core.c +++ b/drivers/video/console_core.c @@ -160,8 +160,8 @@ int fill_char_horizontally(uchar *pfont, void **line, struct video_priv *vid_pri return ret; } -int draw_cursor_vertically(void **line, struct video_priv *vid_priv, - uint height, bool direction) +int cursor_show(void **line, struct video_priv *vid_priv, uint height, + bool direction) { int step, line_step, pbytes, ret; uint value; @@ -188,6 +188,7 @@ int draw_cursor_vertically(void **line, struct video_priv *vid_priv, fill_pixel_and_goto_next(&dst, value, pbytes, step); *line += line_step; } + return ret; } diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c index 68d47eb8da6..3865870dcd5 100644 --- a/drivers/video/console_normal.c +++ b/drivers/video/console_normal.c @@ -99,8 +99,7 @@ static int __maybe_unused console_set_cursor_visible(struct udevice *dev, start = vid_priv->fb + y * vid_priv->line_length + x * pbytes; line = start; - draw_cursor_vertically(&line, vid_priv, vc_priv->y_charsize, - NORMAL_DIRECTION); + cursor_show(&line, vid_priv, vc_priv->y_charsize, NORMAL_DIRECTION); return 0; } diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c index fb7f70a4b2a..babab5eb2c3 100644 --- a/drivers/video/console_truetype.c +++ b/drivers/video/console_truetype.c @@ -1032,7 +1032,7 @@ static int truetype_set_cursor_visible(struct udevice *dev, bool visible, x * VNBYTES(vid_priv->bpix); /* Use the shared cursor drawing function */ - draw_cursor_vertically(&line, vid_priv, height, NORMAL_DIRECTION); + cursor_show(&line, vid_priv, height, NORMAL_DIRECTION); video_damage(dev->parent, x, y, VIDCONSOLE_CURSOR_WIDTH, height); diff --git a/drivers/video/vidconsole_internal.h b/drivers/video/vidconsole_internal.h index af2cca8791c..02b73296292 100644 --- a/drivers/video/vidconsole_internal.h +++ b/drivers/video/vidconsole_internal.h @@ -96,7 +96,7 @@ int fill_char_horizontally(uchar *pfont, void **line, struct video_priv *vid_pri struct video_fontdata *fontdata, bool direction); /** - * draw_cursor_vertically() - Draw a simple vertical cursor + * cursor_show() - Draw a simple vertical cursor * * @line: pointer to framebuffer buffer: upper left cursor corner * @vid_priv: driver private data @@ -116,8 +116,8 @@ int fill_char_horizontally(uchar *pfont, void **line, struct video_priv *vid_pri * * Return: 0, if success, or else error code. */ -int draw_cursor_vertically(void **line, struct video_priv *vid_priv, - uint height, bool direction); +int cursor_show(void **line, struct video_priv *vid_priv, uint height, + bool direction); /** * console probe function.