From patchwork Sat Jan 17 00:56:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1548 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=1768611465; bh=QKrsOz6blJuX4UO+NvJhjse2t5WeC+pfoDKB3NCahaY=; 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=T5hgSIu+/j/RjRk6hf4OMkQ8UABuldM6CLhAFhOM68hpRmVYGeXcYVc2Q/+RC4fg9 vs57H7paQv5GTURY8isJCGiCKXwf1wmPFAlZPascAuIHdVcH+J2An5BNTZ3G6uJOYF /A/RqgkutGwjhiID7OxKlvfyqWTWwVX9Hs3TurFr57eyNnafJ6LTBZTfHDfkthS3Rt 8So39M3WmPJI56H3beBf+I64gY9i+vF1T7dXJwNA7SCrVaAicZ5j4mmCNu0+OP6vPp iwFvL6HsSNpq8i7HDfkwoaJaRe8AhZQqlya6ea4OrF032UM8tDw0qgJBtEWK13cpjM +iJtcLkW4+Yag== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 69F89693E7 for ; Fri, 16 Jan 2026 17:57:45 -0700 (MST) 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 nO9wDCaI1ryQ for ; Fri, 16 Jan 2026 17:57:45 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768611465; bh=QKrsOz6blJuX4UO+NvJhjse2t5WeC+pfoDKB3NCahaY=; 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=T5hgSIu+/j/RjRk6hf4OMkQ8UABuldM6CLhAFhOM68hpRmVYGeXcYVc2Q/+RC4fg9 vs57H7paQv5GTURY8isJCGiCKXwf1wmPFAlZPascAuIHdVcH+J2An5BNTZ3G6uJOYF /A/RqgkutGwjhiID7OxKlvfyqWTWwVX9Hs3TurFr57eyNnafJ6LTBZTfHDfkthS3Rt 8So39M3WmPJI56H3beBf+I64gY9i+vF1T7dXJwNA7SCrVaAicZ5j4mmCNu0+OP6vPp iwFvL6HsSNpq8i7HDfkwoaJaRe8AhZQqlya6ea4OrF032UM8tDw0qgJBtEWK13cpjM +iJtcLkW4+Yag== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5875D693E0 for ; Fri, 16 Jan 2026 17:57:45 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768611463; bh=blW+o0aALJRDTQInmMzmo1Qzu+ZmTKlaz5F1tTajq2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IMkbMdNsRc3z9wchZzQyE8c+uwJvvMyEQLrnox45cmeQsM3X+K9LIL1cxl7frHlSp 0E6BCqakCCbkwljhKq7VOXm40WGJhAhkwdqn3fA4o7A197cM7gZRbXdc2ynKNzkZCL bcN3xJ+eiWefDw3zFjT4loOPhZuyeG4rGatS0fLhWYT1HCe3buRdpMbm/J8nYQMkWQ 8joiktkXUFisqnGJ+3xVU1R7mQYjcwDhQ49Hx/9tHPVT9ueUuBO34uoa5KtC+ua/NP mJjWSYsNZgjyp2gvnHmusFhAZnPdIY35ztPeiQLeTq7eiwj/K46IPq32eVEVjyCSrw gBcDy7T2OpBbA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C7DA1693D7; Fri, 16 Jan 2026 17:57:43 -0700 (MST) 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 PzUImXXzRSJV; Fri, 16 Jan 2026 17:57:43 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768611459; bh=h3/1yaCQGNjQlAyzmwL124sv7IiVmRmG0oNx/zV216w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jxJDWp5j++HK8pIjSjbbYIa3AKDLOWL6d7wSiY/90Z1CttBdvC5vnAzdbt9gtYCTI 7s6U3aZhDqN0ehKNBldywhyGxeM96eKmq5PG1QpynN1vRw7bHHMUqLQJ6FoZbzhi2o YfndfKERTs/QSiezq/nGft5ni635TuYWR6VQXPAfWfmE5+qAYIa09acWWRAAW3xtTH E6X2ZqzStUk+yCZbXdJfthmIt/oXy3snrqmDa6w5NXsLkMHwAuwHEfHS895LsYcFIV wzFP7rEpT/2Fyesm3wosKYHes6UWlwkRBInXTX365uF265Piw56pYclrUQ2Zz2tLnA 5CeDVGNhmM1kg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 7AAD6693B1; Fri, 16 Jan 2026 17:57:39 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 16 Jan 2026 17:56:44 -0700 Message-ID: <20260117005702.1684841-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260117005702.1684841-1-sjg@u-boot.org> References: <20260117005702.1684841-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 46WJJ53SD7AZWTMGLGXNCFFHZOAPVTCM X-Message-ID-Hash: 46WJJ53SD7AZWTMGLGXNCFFHZOAPVTCM 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: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 06/18] video: Use vidconsole_ctx_from_priv() in expo_test 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 Update expo_test_render() to use the vidconsole_ctx_from_priv() helper function instead of accessing the ctx field directly. This is more consistent with the rest of the codebase. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- boot/expo_test.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/boot/expo_test.c b/boot/expo_test.c index a905b144745..a5ad571eedb 100644 --- a/boot/expo_test.c +++ b/boot/expo_test.c @@ -120,6 +120,7 @@ int expo_test_render(struct expo *exp) struct expo_test_mode *test = exp->test; struct vidconsole_priv *cons_priv; struct udevice *dev = exp->display; + struct vidconsole_ctx *ctx; struct video_priv *vid_priv; char buf[30]; ulong now; @@ -140,6 +141,7 @@ int expo_test_render(struct expo *exp) vid_priv = dev_get_uclass_priv(dev); cons_priv = dev_get_uclass_priv(exp->cons); + ctx = vidconsole_ctx_from_priv(cons_priv); /* Accumulate delta times for averaging */ test->render_total_us += test->render_delta_us; @@ -176,7 +178,7 @@ int expo_test_render(struct expo *exp) /* Display frame count */ snprintf(buf, sizeof(buf), "frame %6d", test->render_count); - x = vid_priv->xsize - 18 * cons_priv->ctx.x_charsize; + x = vid_priv->xsize - 18 * ctx->x_charsize; y = 10; vidconsole_set_cursor_pos(exp->cons, x, y); vidconsole_put_string(exp->cons, buf); @@ -184,7 +186,7 @@ int expo_test_render(struct expo *exp) /* Display FPS on next line (only if non-zero) */ if (test->fps_last > 0) { snprintf(buf, sizeof(buf), "fps %6d", test->fps_last); - y += cons_priv->ctx.y_charsize; + y += ctx->y_charsize; vidconsole_set_cursor_pos(exp->cons, x, y); vidconsole_put_string(exp->cons, buf); } @@ -193,7 +195,7 @@ int expo_test_render(struct expo *exp) snprintf(buf, sizeof(buf), "render %6lu.%01lums", test->render_avg_us / 1000, (test->render_avg_us % 1000) / 100); - y += cons_priv->ctx.y_charsize; + y += ctx->y_charsize; vidconsole_set_cursor_pos(exp->cons, x, y); vidconsole_put_string(exp->cons, buf); @@ -201,7 +203,7 @@ int expo_test_render(struct expo *exp) snprintf(buf, sizeof(buf), "sync %6lu.%01lums", test->sync_avg_us / 1000, (test->sync_avg_us % 1000) / 100); - y += cons_priv->ctx.y_charsize; + y += ctx->y_charsize; vidconsole_set_cursor_pos(exp->cons, x, y); vidconsole_put_string(exp->cons, buf); @@ -209,7 +211,7 @@ int expo_test_render(struct expo *exp) snprintf(buf, sizeof(buf), "poll %6lu.%01lums", test->poll_avg_us / 1000, (test->poll_avg_us % 1000) / 100); - y += cons_priv->ctx.y_charsize; + y += ctx->y_charsize; vidconsole_set_cursor_pos(exp->cons, x, y); vidconsole_put_string(exp->cons, buf);