From nobody Thu Jul 11 06:50:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WKQNM1MH1z5QQlZ; Thu, 11 Jul 2024 06:50:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WKQNL4zbxz4CBG; Thu, 11 Jul 2024 06:50:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720680642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n09DsVVErajwnIarVrjig7Y9ind8h/1PteitmmjoReA=; b=CIqPk5pML0oFj/QsqVWPIwSmWchDoHMLZwJzsgZbf8OfWDSVGq1FRUDcfWYkkHS0SwTILB 8l4Xxz50TMu5KaZhquP6mQUeI/mxghn/GyLbEqeIBG+mysFZlQy3ZGrZAfyghlI3LsMpB9 d4HRnsSIDmop/Gs/sQv0pRLVGS/G56nZfCD5o5Xu4rM5+RE0KYWCFvNTF4FFDSdwVPkwC9 Fv8D25yscS2WrK2+o+pLoaAnnIhiqoUtR6qlRllpKXGgb14or9o6myWxOt7Xt8I7mEVM0u jKtrSOh/nfCNwpI9o9/NF0G9M9kTWEcnIbk4BndFyl7UqbqTbCcBbmhSJvEDRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720680642; a=rsa-sha256; cv=none; b=QfNA+p0o8TWfnDY0nTcO3+firD5Nnx07NU/zI24eIKOe5lgis4q95cH4n7RLmJaAKSkt5E W2nGkt4MpBWiu4vnpU7eWZ9rdLMpBM8SiBcogB9/K7ml3ggJVYlEBuBky40mhxd67B4S20 /f5ieNggfofU1uvUgjvJ5mDtov8u2zaPJ/2xDasdaVa8zsHd3NY1/o86TQsiL/+ZoU0Aif 8RoI/yaytKft7RF8mj7KosXqeQabHXVMIj5WKVREarLohas0gKa+bgVGTFjC3jtZkcmN9n Or/E4LoXrzlAI5dx3+ZdG8f/yRXfsZqF34TWz9FZpo406DtV/XkDar8QTpKCNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720680642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n09DsVVErajwnIarVrjig7Y9ind8h/1PteitmmjoReA=; b=Jf7ZYzuxgh3JOpYw0l7fBInEHp8L26bJMfKU7nCAI6soqf/ghyKQSrf2T2UM1xhUKmf594 zhmyR4laF5VKUR7GMXeBZCcNU5Dexs5/+D+hqDcX8Z9fnrvqgM6tpYx8LkwkjDLo2hsK0z LqtRy62Kw904ZY+pgd8rQ8Kx72AzbwdSEfH2aSMo3fgT5yoI1jc/hNHUruJMnKFNdwSxst BtyucLsIZfcASuhtTa3zXFvj/AGwUOQtmokmKxSI8L2L1v3xz0WS1PKB0Muds9u+Xe3ePm P6Bhrc4A0jn6aGsKawJUOUI05ZBN5RWFUOaD5Rva0pprhk3DAU1g2tr8Z2q5Kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WKQNL40wGzqH6; Thu, 11 Jul 2024 06:50:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46B6og69073556; Thu, 11 Jul 2024 06:50:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46B6ogKU073553; Thu, 11 Jul 2024 06:50:42 GMT (envelope-from git) Date: Thu, 11 Jul 2024 06:50:42 GMT Message-Id: <202407110650.46B6ogKU073553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: f6e8b0e85081 - main - vt: splash: Use splash screen passed from loader List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6e8b0e85081681100bf9cd74423be02233204bc Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f6e8b0e85081681100bf9cd74423be02233204bc commit f6e8b0e85081681100bf9cd74423be02233204bc Author: Emmanuel Vadot AuthorDate: 2024-07-09 12:38:41 +0000 Commit: Emmanuel Vadot CommitDate: 2024-07-11 06:47:25 +0000 vt: splash: Use splash screen passed from loader If loader(8) gives use a splash screen to use using the MODINFOMD_SPLASH type, use it if RB_MUTE is set to "YES". By design only argb data will be displayed. Differential Revision: https://reviews.freebsd.org/D45931 Reviewed by: imp, tsoome Sponsored by: Beckhoff Automation GmbH & Co. KG --- sys/dev/vt/vt_core.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 92c83aee5967..df97d21745f0 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -1657,18 +1658,33 @@ vtterm_done(struct terminal *tm) static void vtterm_splash(struct vt_device *vd) { + caddr_t kmdp; + struct splash_info *si; + uintptr_t image; vt_axis_t top, left; - /* Display a nice boot splash. */ + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + si = MD_FETCH(kmdp, MODINFOMD_SPLASH, struct splash_info *); if (!(vd->vd_flags & VDF_TEXTMODE) && (boothowto & RB_MUTE)) { - top = (vd->vd_height - vt_logo_height) / 2; - left = (vd->vd_width - vt_logo_width) / 2; - switch (vt_logo_depth) { - case 1: - /* XXX: Unhardcode colors! */ + if (si == NULL) { + top = (vd->vd_height - vt_logo_height) / 2; + left = (vd->vd_width - vt_logo_width) / 2; vd->vd_driver->vd_bitblt_bmp(vd, vd->vd_curwindow, vt_logo_image, NULL, vt_logo_width, vt_logo_height, left, top, TC_WHITE, TC_BLACK); + } else { + if (si->si_depth != 4) + return; + printf("SPLASH: width: %d height: %d depth: %d\n", si->si_width, si->si_height, si->si_depth); + image = (uintptr_t)si + sizeof(struct splash_info); + image = roundup2(image, 8); + top = (vd->vd_height - si->si_height) / 2; + left = (vd->vd_width - si->si_width) / 2; + vd->vd_driver->vd_bitblt_argb(vd, vd->vd_curwindow, + (unsigned char *)image, si->si_width, si->si_height, + left, top); } vd->vd_flags |= VDF_SPLASH; }