From patchwork Mon Feb 27 17:37:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 1749017 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=hmoWXjc0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PQSPP3FmZz1yX2 for ; Tue, 28 Feb 2023 04:37:29 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A997285ABF; Mon, 27 Feb 2023 18:37:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hmoWXjc0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 79B9D85AA1; Mon, 27 Feb 2023 18:37:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1035385A6E for ; Mon, 27 Feb 2023 18:37:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dsankouski@gmail.com Received: by mail-ed1-x533.google.com with SMTP id i34so29005800eda.7 for ; Mon, 27 Feb 2023 09:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=neY15ZZDXhMg0NWwtAt2jYuFpcUs0IFRwvt6TSKH54s=; b=hmoWXjc0jpj5fe3sV7lq3CgW5C8Y1Qch3SG0f5TIB+E5Ub99pL3y8IAEAdK//osiYw IHc20jnkqgE7mcWBIKiLfz1VDrwd8C1sSmGDnV3eSz2DzOWjUlHf9n/cs7PQKxhqjgKt 1r8+mMSlCXoIUA2LByFMvh2JEbVzcyh9FAqtYhgqf9hwifyCCjxd/IQr+ZcEU0OQkfom btVSR4E+S6v5T7+ocNJLA1d+e47t786XvCYixuOlA/xRlW/TXzyOec0Lw6G4f6IYM4Oo /vF2k0dGAXRImxv5ULuLl0h94zNmM60iEBOmgP6KFPKRB438Epn5e3/uvwwuh81jpEom owbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=neY15ZZDXhMg0NWwtAt2jYuFpcUs0IFRwvt6TSKH54s=; b=Dnn8eNBmQs1CFQAyKP3rDySBbnvgN9WS8HVG08j2gLfyQ4eKhlHqS9Dag3y1Y7pysi +gNZxi4SbBI7dwrNk/P0bjbILnLlXD4duniKFLHS/00EACGgmIyYA7nc/jIaOgo4UK2X I5ix2/tsU0ZmSlK135YIdaHRCV7yXeOLeTYTAjhn+El2lfn8NMbAC/Ty3mINRv5zneQW Rf3SadYYpvLmj/uGe1h4ZhHrrOrzGqzBeHPqM/UXnvh9r/B9dg5IFTlraenkOFt5echk UT8rTRFTaTq9kpOnlbNeN2KvQ+70vu40gSx3tyac6R7whbDAUmYbbE2BFYMkwA/PU70a tFVQ== X-Gm-Message-State: AO0yUKVkq77QadB2Zx8MXmfc+2eBp61GPlvPoi5tiZO312wq0RHvpj8a 05J8gtD3TYHabbAoX8gjzM6W310d1lE= X-Google-Smtp-Source: AK7set/rFnIVqflGTEDThJthkuNX2fF2ZQs2mP6pXrU0GTmbVxh/nOhLj8M/yyFSgU5UVncJZwtY+Q== X-Received: by 2002:aa7:dd4d:0:b0:4b0:d079:1e7e with SMTP id o13-20020aa7dd4d000000b004b0d0791e7emr312256edw.25.1677519436161; Mon, 27 Feb 2023 09:37:16 -0800 (PST) Received: from debian.localdomain ([37.45.144.86]) by smtp.googlemail.com with ESMTPSA id c89-20020a509fe2000000b004aeeb476c5bsm3349912edf.24.2023.02.27.09.37.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 09:37:15 -0800 (PST) From: Dzmitry Sankouski To: u-boot@lists.denx.de Cc: Dzmitry Sankouski , Anatolij Gustschin , Simon Glass Subject: [PATCH v7 00/10] vidconsole: refactoring and support for wider fonts Date: Mon, 27 Feb 2023 20:37:00 +0300 Message-Id: <20230227173710.1688611-1-dsankouski@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Version 7 has vidconsole_get_font_size() function reworked to use driver ops. Version 6 contains entire rebased patch series. New patch 'move vidconsole_get_font_size() to test.h' added. Version 5 contain minor changes: - move common functions to console-core.c file - remove static keyword from shared functions In version 4, only first patch sent, because review fixes to this would add large rebase & patch formatting overhead. When it'll receive reviewed tag, I'll resent entire rebased series. Modern mobile phones typically have high pixel density. Bootmenu is hardly readable on those with 8x16 font. This patch series aims to add wider fonts for devices with high ppi. Add 16x32, 12x22 fonts from linux, and allow font size configuration. There was significant changes in version 2: - fix video tests failures - add runtime font size configuration - add test for 12x22 font In version 3, 'video console: add select font logic to vidconsole uclass driver' patch was removed in favor of already merged patch 'video: Add font functions to the vidconsole API' Dzmitry Sankouski (10): video console: refactoring and optimization video console: add support for fonts wider than 1 byte video console: move 8x16 font data in named header video console: implement multiple fonts configuration video console: move vidconsole_get_font_size() logic to driver ops video console: allow font size configuration at runtime video console: add 12x22 Sun font from linux video console: add 16x32 Terminus font from linux video console: sandbox_defconfig: add 12x22 font video console: add 12x22 console simple font test cmd/Kconfig | 8 + cmd/Makefile | 2 +- cmd/font.c | 6 +- common/splash.c | 17 +- configs/sandbox_defconfig | 5 +- drivers/video/Kconfig | 30 + drivers/video/Makefile | 6 + drivers/video/console_core.c | 212 + drivers/video/console_normal.c | 177 +- drivers/video/console_rotate.c | 371 +- drivers/video/console_truetype.c | 3 +- drivers/video/vidconsole-uclass.c | 11 + drivers/video/vidconsole_internal.h | 120 + include/video_console.h | 14 +- include/video_font.h | 31 +- include/video_font_4x6.h | 11 +- include/video_font_8x16.h | 4624 ++++++++++++++++++++ include/video_font_data.h | 4644 +------------------- include/video_font_sun12x22.h | 6158 +++++++++++++++++++++++++++ include/video_font_ter16x32.h | 2062 +++++++++ test/cmd/font.c | 13 +- test/dm/video.c | 41 + 22 files changed, 13515 insertions(+), 5051 deletions(-) create mode 100644 drivers/video/console_core.c create mode 100644 drivers/video/vidconsole_internal.h create mode 100644 include/video_font_8x16.h create mode 100644 include/video_font_sun12x22.h create mode 100644 include/video_font_ter16x32.h