From patchwork Tue Oct 27 16:31:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peilin Ye X-Patchwork-Id: 11860815 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98BE3C55178 for ; Tue, 27 Oct 2020 16:31:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F4B420757 for ; Tue, 27 Oct 2020 16:31:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eJd5hFTo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F4B420757 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 73AD96E1E8; Tue, 27 Oct 2020 16:31:52 +0000 (UTC) Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 04D166E1CF for ; Tue, 27 Oct 2020 16:31:51 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id x13so1209474pfa.9 for ; Tue, 27 Oct 2020 09:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nUeg+KxMLxDKpdFvHBE7A01n74AzfVei6UlOMkqKwCo=; b=eJd5hFTofb9nO3xoRiSpfTlcid9glOapJOgmYsVfMyHHvMSOJrs4pSTEHyGbbow16A ylY6G8NsY4Rp2W3YRR23uTBIjPOT6NLyB31lgklY3LxgRJ/jXQHmWYolJMwNMykAU31L omCPGFyX2TlmPysrnXjSmUBT8KEmMLUW+VC7XCS+IyXKHgQxUeuMo1eHvIeFGwJm1BcP vk75vFLvPAzsd9ZmvJaT58BJu7ihx6Ek0p7WWMCQA59LU+F79ktZMZugsSsvx14EMtQ7 0mfZo1CtrJq1SA460eQflL/mteTWCpWJlAEewb/I7nJcuLWBv8+OdRm8fXsBjW5Y/XB4 qKww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nUeg+KxMLxDKpdFvHBE7A01n74AzfVei6UlOMkqKwCo=; b=eFaJfdnHFUUuSR0RCPebsQS8SRBmAhO4PjnMebPXHU40u/1Q6wEHTSMxPs04byZN3o Zl9faNWEj/5NIFBAoSPYW5PajJDJo4yEsRmqT3kuOp8IbIF2n/ZwjX75734vkV5ZmIbT YYNHExTphuJFD4ulQEtviR53N0VkoQdRo2vDeFTxI3fSPn4WBPaGHkiqy2nzI1v/macj 4O7Czn7BUI7Ja5deQKnOEYyqNZYBGQ/Klpik46P7/JiFTxhyyVl0p+f2RlFBSp9nN7D4 sLMT1HhgNcdRR4jH+E1/cSQcNA1zDPdXjMCVaZT3yW1XXo/PXUVQwOQ17H5W+BvYHQyU UPCg== X-Gm-Message-State: AOAM533yInB25Dlrd+ZLWtMoyQFpHJnbUpWDKgzQlUzcIKRQaftcKj/9 q/qfgq9ePC/s6BlvChNkhA== X-Google-Smtp-Source: ABdhPJzXlpA9p0YQjtHIKX03TX1A/bHiqf2YTkdJxUi2MkxnIAQILYuosDzjXEQDPdnA50zJo6DPEA== X-Received: by 2002:a63:fe49:: with SMTP id x9mr2496134pgj.192.1603816310574; Tue, 27 Oct 2020 09:31:50 -0700 (PDT) Received: from localhost.localdomain (n11212042025.netvigator.com. [112.120.42.25]) by smtp.gmail.com with ESMTPSA id y8sm2771710pfg.104.2020.10.27.09.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 09:31:49 -0700 (PDT) From: Peilin Ye To: Daniel Vetter , Greg Kroah-Hartman Subject: [PATCH 1/5] fbdev/atafb: Remove unused extern variables Date: Tue, 27 Oct 2020 12:31:08 -0400 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andrew Morton , Peilin Ye , Mike Rapoport Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Remove 6 unused extern variables to reduce confusion. It is worth mentioning that lib/fonts/font_8x8.c and lib/fonts/font_8x16.c also declare `fontdata_8x8` and `fontdata_8x16` respectively, and this file has nothing to do with them. Signed-off-by: Peilin Ye Reviewed-by: Geert Uytterhoeven Acked-by: Thomas Zimmermann --- $ # Build-tested (Ubuntu 20.04) $ sudo apt install gcc-m68k-linux-gnu $ cp arch/m68k/configs/atari_defconfig .config $ make ARCH=m68k menuconfig $ make ARCH=m68k CROSS_COMPILE=m68k-linux-gnu- -j`nproc` all drivers/video/fbdev/atafb.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index f253daa05d9d..e3812a8ff55a 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -240,14 +240,6 @@ static int *MV300_reg = MV300_reg_8bit; static int inverse; -extern int fontheight_8x8; -extern int fontwidth_8x8; -extern unsigned char fontdata_8x8[]; - -extern int fontheight_8x16; -extern int fontwidth_8x16; -extern unsigned char fontdata_8x16[]; - /* * struct fb_ops { * * open/release and usage marking From patchwork Tue Oct 27 16:33:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peilin Ye X-Patchwork-Id: 11860827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEB85C55178 for ; Tue, 27 Oct 2020 16:34:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 82CCC21D24 for ; Tue, 27 Oct 2020 16:34:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qV2cOWA0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82CCC21D24 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C7BE6E1CF; Tue, 27 Oct 2020 16:34:03 +0000 (UTC) Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by gabe.freedesktop.org (Postfix) with ESMTPS id 324096E1CF for ; Tue, 27 Oct 2020 16:34:03 +0000 (UTC) Received: by mail-pl1-x641.google.com with SMTP id o9so1026887plx.10 for ; Tue, 27 Oct 2020 09:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=In/51AAXPn5EUWnx/UEYdjmTkRcrDAtPtyplaFeQ5lU=; b=qV2cOWA0GuqXDv+sBSouYZakOv5oFD4hgNf87hpEXF15Qq6sizcGpXNOD74WCXRcyv sO/6Tj/7iiwM9RpQdAbqqnNzT2YptHVUx8aGi2nb/wOnMB2L6hTcG+fENUtGC704OQeB OIvg9/sjXLRUzNEoS6cfGm0CB1cK6CwxiVYKkIeqQXO2O7pBxdEYIdTl09rtvVfPTYl6 DTWd8dOPZ2RAKadUbZ7lyRyJiFl+OilJWGQkEXvWKnG+EEIGEwVIDviHyTbWkf0bBPF3 C1qztcCFxeaUH9057nGg+r2mVwEQhOkgHxDdjZWQLSRvxcgn2sjn51v8dLGTej9Zl7rS X/uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=In/51AAXPn5EUWnx/UEYdjmTkRcrDAtPtyplaFeQ5lU=; b=csb/EYDa++uCvfhwASvWb00K8N9tq5S/ORkFdZN/sGNVMUb/hCJXuY0gxPDb0ryJP8 AteBuduHil1ydKbMF20jmrXEojjCVpuBvpx3ONSqiDirbMWB17U4xzQE2JUz8eCTyUWS EFK0UdxjmQBPpX8R90dykPq61c8+ieFAQXUU9+Wxfzrl/mR8Wncb+UynAus0ehQxq0wK hW9oO1ZYSd9DeV89njdBqpKWzX7zRtC7sUJw2MZBWedSkjyLNCEq5qo47+WQcXAe+ls6 ud2uvyBGqQKDIem3bYCjrnK0FawR7wT4DSfBTnnM4Cpn1uFuoMMhPv1+QAIpnNjWRmAA ORDA== X-Gm-Message-State: AOAM533xiSDrpvWz8K4NoqWH/vMCFUUwQOv9p1+E6VVG8W0TjEAHyyTh mLh9stHHndmA3SpAqZ/xtA== X-Google-Smtp-Source: ABdhPJyfbezIzRHApDWXipuccB2NB1//aO/tcW0Oq+NmOzFSnqmlIn40ZQ4T6DNDnbAh/dzCFxWw0Q== X-Received: by 2002:a17:90b:3501:: with SMTP id ls1mr880626pjb.26.1603816442913; Tue, 27 Oct 2020 09:34:02 -0700 (PDT) Received: from localhost.localdomain (n11212042025.netvigator.com. [112.120.42.25]) by smtp.gmail.com with ESMTPSA id n16sm2854465pfo.150.2020.10.27.09.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 09:34:02 -0700 (PDT) From: Peilin Ye To: Daniel Vetter , Greg Kroah-Hartman , "James E . J . Bottomley" , Helge Deller Subject: [PATCH 2/5] Fonts: Make font size unsigned in font_desc Date: Tue, 27 Oct 2020 12:33:05 -0400 Message-Id: <54f7d42e07eca2a2f13669575a9de88023ebc1ac.1603788512.git.yepeilin.cs@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, linux-parisc@vger.kernel.org, Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jiri Slaby , Peilin Ye Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" It is improper to define `width` and `height` as signed in `struct font_desc`. Make them unsigned. Also, change the corresponding printk() format identifiers from `%d` to `%u`, in sti_select_fbfont(). Signed-off-by: Peilin Ye --- Build-tested. drivers/video/console/sticore.c | 2 +- include/linux/font.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 6a26a364f9bd..d1bb5915082b 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c @@ -502,7 +502,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) if (!fbfont) return NULL; - pr_info("STI selected %dx%d framebuffer font %s for sticon\n", + pr_info("STI selected %ux%u framebuffer font %s for sticon\n", fbfont->width, fbfont->height, fbfont->name); bpc = ((fbfont->width+7)/8) * fbfont->height; diff --git a/include/linux/font.h b/include/linux/font.h index b5b312c19e46..4f50d736ea72 100644 --- a/include/linux/font.h +++ b/include/linux/font.h @@ -16,7 +16,7 @@ struct font_desc { int idx; const char *name; - int width, height; + unsigned int width, height; const void *data; int pref; }; From patchwork Tue Oct 27 16:34:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peilin Ye X-Patchwork-Id: 11860825 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B177AC388F9 for ; Tue, 27 Oct 2020 16:35:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3944F218AC for ; Tue, 27 Oct 2020 16:35:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LMHjd1bX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3944F218AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34AED89A56; Tue, 27 Oct 2020 16:35:02 +0000 (UTC) Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by gabe.freedesktop.org (Postfix) with ESMTPS id B61CB89A56 for ; Tue, 27 Oct 2020 16:35:00 +0000 (UTC) Received: by mail-pl1-x644.google.com with SMTP id x10so1023493plm.13 for ; Tue, 27 Oct 2020 09:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JV1M0R7sWTwTaaTkoEKbUlOKfWUaHbnqWovJ8v04zgY=; b=LMHjd1bXvxd/bYn3jQmks6hvgVo+OtZFs74VifFB5zMBrW+G/m/37gxW7gqHKfxrA6 yJQFgwF3eaRElSOAhthTo03OanMfOHiQX6RCpVdy4LwPxz3EnKAa31DFa34SusBi2aI0 zy5ZT8WGKaQXKMOlKyU8tRXdAJwufN0MV769En/puhxsBvBlMNlDe5Lb8vA6a7SaPJOm ih7jNr24tlWHAmEPmtlih78gA2UwFBuPazJ2PNLSB2vgvVyyUtbAG3Ud4QdmGuBal8XV 9w5ZRbyEbYuuUBoIqQJK3PIpihE05h8VB/KbWAkYLOJeODft1YNz5wnUR/BkOUHIQrnS WbEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JV1M0R7sWTwTaaTkoEKbUlOKfWUaHbnqWovJ8v04zgY=; b=uNYYD4l1Vw+p9pV0gXRXtLICifP1ETCMKa3ix0jfjHOPPyjBG4yNn4ZqQ4p7hqG/cr d4fZ7r+RUpEpuE54SofetVpoWLBWChE8wjy3mscz8Fz6VXUOmrBuc9kskg1HwNSlyHyt o9qdkOgOm0xoLH3hdttBNYpeZvIxm4IEpaJ/vwgqM/jyKQllORCbpbEf7QohfC4jLCmI bVi+BDlN2uDTBLk2fv6EY3bo/InPgSYeQvekjdTc0cjL4vlIVE8BsH/2pSXvtFhVpOL0 gvrxNLefd5/H1i4PMiLYPMwNr3tQkU8Bo2J7ywmZ1fZo35ax28KM2b6nE0CDztxvETO4 LQBQ== X-Gm-Message-State: AOAM5313f7tO7DFdkQtiBfG5kSDj/IlOqnmcXNYujb0DHbwQW7YXd6gY XRSCNVZDPGBM47plzo8mFw== X-Google-Smtp-Source: ABdhPJyEjq05U32jyEROhfVB6XyfMyFibm4+eFMt9raWj+UiSFhzYCjPwf3NticHJ73BlYSftN0rqw== X-Received: by 2002:a17:902:c254:b029:d4:c2d4:15f with SMTP id 20-20020a170902c254b02900d4c2d4015fmr3428064plg.18.1603816500347; Tue, 27 Oct 2020 09:35:00 -0700 (PDT) Received: from localhost.localdomain (n11212042025.netvigator.com. [112.120.42.25]) by smtp.gmail.com with ESMTPSA id 20sm2785308pfh.219.2020.10.27.09.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 09:34:59 -0700 (PDT) From: Peilin Ye To: Daniel Vetter , Greg Kroah-Hartman Subject: [PATCH 3/5] Fonts: Add charcount field to font_desc Date: Tue, 27 Oct 2020 12:34:26 -0400 Message-Id: <6c28279a10dbe7a7e5ac3e3a8dd7c67f8d63a9f2.1603788512.git.yepeilin.cs@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <54f7d42e07eca2a2f13669575a9de88023ebc1ac.1603788512.git.yepeilin.cs@gmail.com> References: <54f7d42e07eca2a2f13669575a9de88023ebc1ac.1603788512.git.yepeilin.cs@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Bartlomiej Zolnierkiewicz , Sascha Hauer , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sven Schneider , Jiri Slaby , Peilin Ye Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Subsystems are assuming the number of characters of our built-in fonts. Include that information in our kernel font descriptor, `struct font_desc`. Signed-off-by: Peilin Ye Reviewed-by: Daniel Vetter --- include/linux/font.h | 1 + lib/fonts/font_10x18.c | 1 + lib/fonts/font_6x10.c | 1 + lib/fonts/font_6x11.c | 1 + lib/fonts/font_6x8.c | 1 + lib/fonts/font_7x14.c | 1 + lib/fonts/font_8x16.c | 1 + lib/fonts/font_8x8.c | 1 + lib/fonts/font_acorn_8x8.c | 1 + lib/fonts/font_mini_4x6.c | 1 + lib/fonts/font_pearl_8x8.c | 1 + lib/fonts/font_sun12x22.c | 1 + lib/fonts/font_sun8x16.c | 1 + lib/fonts/font_ter16x32.c | 1 + 14 files changed, 14 insertions(+) diff --git a/include/linux/font.h b/include/linux/font.h index 4f50d736ea72..abf1442ce719 100644 --- a/include/linux/font.h +++ b/include/linux/font.h @@ -17,6 +17,7 @@ struct font_desc { int idx; const char *name; unsigned int width, height; + unsigned int charcount; const void *data; int pref; }; diff --git a/lib/fonts/font_10x18.c b/lib/fonts/font_10x18.c index 0e2deac97da0..4096c6562494 100644 --- a/lib/fonts/font_10x18.c +++ b/lib/fonts/font_10x18.c @@ -5137,6 +5137,7 @@ const struct font_desc font_10x18 = { .name = "10x18", .width = 10, .height = 18, + .charcount = 256, .data = fontdata_10x18.data, #ifdef __sparc__ .pref = 5, diff --git a/lib/fonts/font_6x10.c b/lib/fonts/font_6x10.c index 87da8acd07db..32786674cf65 100644 --- a/lib/fonts/font_6x10.c +++ b/lib/fonts/font_6x10.c @@ -3083,6 +3083,7 @@ const struct font_desc font_6x10 = { .name = "6x10", .width = 6, .height = 10, + .charcount = 256, .data = fontdata_6x10.data, .pref = 0, }; diff --git a/lib/fonts/font_6x11.c b/lib/fonts/font_6x11.c index 5e975dfa10a5..81e4a3aed44a 100644 --- a/lib/fonts/font_6x11.c +++ b/lib/fonts/font_6x11.c @@ -3346,6 +3346,7 @@ const struct font_desc font_vga_6x11 = { .name = "ProFont6x11", .width = 6, .height = 11, + .charcount = 256, .data = fontdata_6x11.data, /* Try avoiding this font if possible unless on MAC */ .pref = -2000, diff --git a/lib/fonts/font_6x8.c b/lib/fonts/font_6x8.c index 700039a9ceae..5618ae7ef9fa 100644 --- a/lib/fonts/font_6x8.c +++ b/lib/fonts/font_6x8.c @@ -2571,6 +2571,7 @@ const struct font_desc font_6x8 = { .name = "6x8", .width = 6, .height = 8, + .charcount = 256, .data = fontdata_6x8.data, .pref = 0, }; diff --git a/lib/fonts/font_7x14.c b/lib/fonts/font_7x14.c index 86d298f38505..7708e73d491f 100644 --- a/lib/fonts/font_7x14.c +++ b/lib/fonts/font_7x14.c @@ -4113,6 +4113,7 @@ const struct font_desc font_7x14 = { .name = "7x14", .width = 7, .height = 14, + .charcount = 256, .data = fontdata_7x14.data, .pref = 0, }; diff --git a/lib/fonts/font_8x16.c b/lib/fonts/font_8x16.c index 37cedd36ca5e..74125d3570cf 100644 --- a/lib/fonts/font_8x16.c +++ b/lib/fonts/font_8x16.c @@ -4627,6 +4627,7 @@ const struct font_desc font_vga_8x16 = { .name = "VGA8x16", .width = 8, .height = 16, + .charcount = 256, .data = fontdata_8x16.data, .pref = 0, }; diff --git a/lib/fonts/font_8x8.c b/lib/fonts/font_8x8.c index 8ab695538395..96da4bb31ae4 100644 --- a/lib/fonts/font_8x8.c +++ b/lib/fonts/font_8x8.c @@ -2578,6 +2578,7 @@ const struct font_desc font_vga_8x8 = { .name = "VGA8x8", .width = 8, .height = 8, + .charcount = 256, .data = fontdata_8x8.data, .pref = 0, }; diff --git a/lib/fonts/font_acorn_8x8.c b/lib/fonts/font_acorn_8x8.c index 069b3e80c434..ba74053fec7b 100644 --- a/lib/fonts/font_acorn_8x8.c +++ b/lib/fonts/font_acorn_8x8.c @@ -270,6 +270,7 @@ const struct font_desc font_acorn_8x8 = { .name = "Acorn8x8", .width = 8, .height = 8, + .charcount = 256, .data = acorndata_8x8.data, #ifdef CONFIG_ARCH_ACORN .pref = 20, diff --git a/lib/fonts/font_mini_4x6.c b/lib/fonts/font_mini_4x6.c index 1449876c6a27..637708e8c67e 100644 --- a/lib/fonts/font_mini_4x6.c +++ b/lib/fonts/font_mini_4x6.c @@ -2152,6 +2152,7 @@ const struct font_desc font_mini_4x6 = { .name = "MINI4x6", .width = 4, .height = 6, + .charcount = 256, .data = fontdata_mini_4x6.data, .pref = 3, }; diff --git a/lib/fonts/font_pearl_8x8.c b/lib/fonts/font_pearl_8x8.c index 32d65551e7ed..06cde43c7bd2 100644 --- a/lib/fonts/font_pearl_8x8.c +++ b/lib/fonts/font_pearl_8x8.c @@ -2582,6 +2582,7 @@ const struct font_desc font_pearl_8x8 = { .name = "PEARL8x8", .width = 8, .height = 8, + .charcount = 256, .data = fontdata_pearl8x8.data, .pref = 2, }; diff --git a/lib/fonts/font_sun12x22.c b/lib/fonts/font_sun12x22.c index 641a6b4dca42..d0290d79df2c 100644 --- a/lib/fonts/font_sun12x22.c +++ b/lib/fonts/font_sun12x22.c @@ -6156,6 +6156,7 @@ const struct font_desc font_sun_12x22 = { .name = "SUN12x22", .width = 12, .height = 22, + .charcount = 256, .data = fontdata_sun12x22.data, #ifdef __sparc__ .pref = 5, diff --git a/lib/fonts/font_sun8x16.c b/lib/fonts/font_sun8x16.c index 193fe6d988e0..7d83760354a6 100644 --- a/lib/fonts/font_sun8x16.c +++ b/lib/fonts/font_sun8x16.c @@ -268,6 +268,7 @@ const struct font_desc font_sun_8x16 = { .name = "SUN8x16", .width = 8, .height = 16, + .charcount = 256, .data = fontdata_sun8x16.data, #ifdef __sparc__ .pref = 10, diff --git a/lib/fonts/font_ter16x32.c b/lib/fonts/font_ter16x32.c index 91b9c283bd9c..a2cc25b9f8e3 100644 --- a/lib/fonts/font_ter16x32.c +++ b/lib/fonts/font_ter16x32.c @@ -2062,6 +2062,7 @@ const struct font_desc font_ter_16x32 = { .name = "TER16x32", .width = 16, .height = 32, + .charcount = 256, .data = fontdata_ter16x32.data, #ifdef __sparc__ .pref = 5, From patchwork Tue Oct 27 16:37:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peilin Ye X-Patchwork-Id: 11860849 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4767C55178 for ; Tue, 27 Oct 2020 16:38:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 56A622076A for ; Tue, 27 Oct 2020 16:38:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M1vwXINy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56A622076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDE7E89DB8; Tue, 27 Oct 2020 16:38:06 +0000 (UTC) Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5DD8289BB0 for ; Tue, 27 Oct 2020 16:38:05 +0000 (UTC) Received: by mail-pf1-x441.google.com with SMTP id w65so1232738pfd.3 for ; Tue, 27 Oct 2020 09:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T0NQC8q5PZfZ/nsIJ5qKnoN7K1varb2/TGSSOiRrezY=; b=M1vwXINyKCI2zbkqZyjRXzOz+OiTTjv5+YsMO5WomPxQ3OpKFOn7449dzir9pXj29D N5LsWZQuc+CpSU0G6fApBL8OSc3ryHX6s4+fH7/jMVFh8f3/aTe3/XJ1Ptp/jgX7r+t9 9xZFjZp26qxDvFk9dfn92Za9iIbief2hH5kZJ6lYpp2Ug7hYAdAIIbpVGHbquuB8px5+ LJQUV0NFSXrXOEc1N2TBFJmfeEId/wIGYG3QrPBOWi9ebke753T1av3HH461g4YDBEmp Rt6Abuk4cHAhe3quvhm7Y+ucPdDhEs7s8FvMm4Xd2uPJGWC7E+Bo6tSPsXJgl9VVG1XI FABw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T0NQC8q5PZfZ/nsIJ5qKnoN7K1varb2/TGSSOiRrezY=; b=nc/3mwatQpQVKGo2IAWx+y1M3JCw0gtR5bnH+QM78UNox56EydmbTv6vmQSBk+mrgA hJsvmiyy4lsJXrXW9hELa8xbzej8eTMY8zsihCqabnGccn7c2u0MKN6RFGcwT7Xs0Rl7 5am+AueD+FClOVxbUfgw8d+QHXBI9pp2BnktZw+T9RTUaVae8/T+JIuTav5r/EynUwRr C5H3EWs7JEfUV2E3CjJImUwIzVBV1eCTbdzrO7rbXBDTnNrT2YUFxCKCklXSKYGHa9Ef yf2OOIbu0GpqJ9LFIpBMfioaaBCOACgWKTFNZbe4MrKIWSlalaSUf7j6rffb+HUchu2A E4vg== X-Gm-Message-State: AOAM532jxX3c+oGodW9bq3XNNmhxKH6MPk6vUYUJuKjNqesdjg/Mrxxu C8IXQxACNdgWoR9P87IHWg== X-Google-Smtp-Source: ABdhPJxBV7fdXTggzQ998E92lWxE1sdD8P1AgGgCr6mresHIg18LPfPSKo6TccWBfKl7Hovza/PVDw== X-Received: by 2002:a63:5d61:: with SMTP id o33mr2564224pgm.295.1603816685018; Tue, 27 Oct 2020 09:38:05 -0700 (PDT) Received: from localhost.localdomain (n11212042025.netvigator.com. [112.120.42.25]) by smtp.gmail.com with ESMTPSA id b7sm3139676pfr.171.2020.10.27.09.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 09:38:04 -0700 (PDT) From: Peilin Ye To: Daniel Vetter , Greg Kroah-Hartman Subject: [PATCH 4/5] fbcon: Avoid hard-coding built-in font charcount Date: Tue, 27 Oct 2020 12:37:29 -0400 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: <6c28279a10dbe7a7e5ac3e3a8dd7c67f8d63a9f2.1603788512.git.yepeilin.cs@gmail.com> References: <54f7d42e07eca2a2f13669575a9de88023ebc1ac.1603788512.git.yepeilin.cs@gmail.com> <6c28279a10dbe7a7e5ac3e3a8dd7c67f8d63a9f2.1603788512.git.yepeilin.cs@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jiri Slaby , Peilin Ye Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" fbcon_startup() and fbcon_init() are hard-coding the number of characters of our built-in fonts as 256. Recently, we included that information in our kernel font descriptor `struct font_desc`, so use `font->charcount` instead of a hard-coded value. This patch depends on patch "Fonts: Add charcount field to font_desc". Signed-off-by: Peilin Ye --- drivers/video/fbdev/core/fbcon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index cef437817b0d..e563847991b7 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -1004,7 +1004,7 @@ static const char *fbcon_startup(void) vc->vc_font.width = font->width; vc->vc_font.height = font->height; vc->vc_font.data = (void *)(p->fontdata = font->data); - vc->vc_font.charcount = 256; /* FIXME Need to support more fonts */ + vc->vc_font.charcount = font->charcount; } else { p->fontdata = vc->vc_font.data; } @@ -1083,8 +1083,7 @@ static void fbcon_init(struct vc_data *vc, int init) vc->vc_font.width = font->width; vc->vc_font.height = font->height; vc->vc_font.data = (void *)(p->fontdata = font->data); - vc->vc_font.charcount = 256; /* FIXME Need to - support more fonts */ + vc->vc_font.charcount = font->charcount; } } From patchwork Tue Oct 27 16:41:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peilin Ye X-Patchwork-Id: 11860877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8A02C388F9 for ; Tue, 27 Oct 2020 16:41:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F0C42076A for ; Tue, 27 Oct 2020 16:41:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vFw9A52v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F0C42076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C90016E12D; Tue, 27 Oct 2020 16:41:56 +0000 (UTC) Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by gabe.freedesktop.org (Postfix) with ESMTPS id 776426E12D for ; Tue, 27 Oct 2020 16:41:55 +0000 (UTC) Received: by mail-pj1-x1043.google.com with SMTP id p21so1078903pju.0 for ; Tue, 27 Oct 2020 09:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ebBfe6g+xIwA0Tw7T7ptAhswGHI+h9atRQ+wtk5eLJM=; b=vFw9A52vUPt+Z6azESaiWaj6f6RnK6WmgcZfmCdqg30ygptQfXqoaWHeScuoNsMUcL LFBrxcc3UK6ZrcRlK5yMWQydC4uSY8bXOQANfqwRP1eXlykw3jV58ZyR58sIXBm+HRfy vYQZ8hSojiimEwm6a2/Jpl+5twHC88GdAmxu3wHGuRHWue5fVcJY1DPUHhnpeRigSGZc VrPVUTeS6NGaTlPe7onOvCg10lX1FXx8QdW4QCJZ8DwsAcTcxh7dq+42zHm6DOHOPN6X Fkze0CaGWSHSGRhOa+UQSIkAV+OUv4T06N/Yptxodpi2pNzEzDFOn+8yW6ly7Lth7XwK QnvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ebBfe6g+xIwA0Tw7T7ptAhswGHI+h9atRQ+wtk5eLJM=; b=bMrgzAVDD+LCvcAcNbKV0kK6BCboPo1mb6XF9isVbEWMf4/5zUZEkFimVdug1I89G3 caUVK6lBTWaisLu4PQJm2tLfU9Q5vlEyw4o6ldlXOQ7+VJIHa1IC2L5xa5ZByV84LeZe n64/anrfJYbIX+HOXQ7/Y1BdjrMspRoYfpGChDnM19V/IipzM1kySTaeJjxYCHoQomZi pA8hDnqezjr/XrRRNgdIqZw4HtL5aCXsUH6LI+V1jn6Iq7Pt7ltTMiFzwjFz9qmATBbU wkGa5SzklB+u+u3xNne/4XlTjxUSofD0EZ4IxzQ4M5wUFk0XWlX5hYjhE41RBQIjL2zk LxGA== X-Gm-Message-State: AOAM532qW78RZOMtimVXd9w5cozVAusUf6unpNNAVqtGKW+ngwBjI+du qBoPA7KbZf1UuTmyygXo2w== X-Google-Smtp-Source: ABdhPJxLkLvUsLuiUeeggrviMsdPesWsRrw2oB2fz/mRoiv9z7/Da38zY8teYsS2tEKx7sc/DwEgDg== X-Received: by 2002:a17:902:b488:b029:d4:dbdf:c6a5 with SMTP id y8-20020a170902b488b02900d4dbdfc6a5mr3312027plr.42.1603816915108; Tue, 27 Oct 2020 09:41:55 -0700 (PDT) Received: from localhost.localdomain (n11212042025.netvigator.com. [112.120.42.25]) by smtp.gmail.com with ESMTPSA id gx20sm2459230pjb.1.2020.10.27.09.41.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 09:41:54 -0700 (PDT) From: Peilin Ye To: Daniel Vetter , Greg Kroah-Hartman , "James E . J . Bottomley" , Helge Deller Subject: [PATCH 5/5] parisc/sticore: Avoid hard-coding built-in font charcount Date: Tue, 27 Oct 2020 12:41:02 -0400 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: <54f7d42e07eca2a2f13669575a9de88023ebc1ac.1603788512.git.yepeilin.cs@gmail.com> <6c28279a10dbe7a7e5ac3e3a8dd7c67f8d63a9f2.1603788512.git.yepeilin.cs@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, linux-parisc@vger.kernel.org, Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Peilin Ye Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" sti_select_fbfont() and sti_cook_fonts() are hard-coding the number of characters of our built-in fonts as 256. Recently, we included that information in our kernel font descriptor `struct font_desc`, so use `fbfont->charcount` instead of hard-coded values. This patch depends on patch "Fonts: Add charcount field to font_desc". Signed-off-by: Peilin Ye Reviewed-by: Daniel Vetter --- $ # Build-tested (Ubuntu 20.04) $ sudo apt-get install binutils-hppa64-linux-gnu gcc-7-hppa64-linux-gnu $ cp arch/parisc/configs/generic-64bit_defconfig .config $ make -j`nproc` ARCH=parisc CROSS_COMPILE=hppa64-linux-gnu- all drivers/video/console/sticore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index d1bb5915082b..f869b723494f 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c @@ -506,7 +506,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) fbfont->width, fbfont->height, fbfont->name); bpc = ((fbfont->width+7)/8) * fbfont->height; - size = bpc * 256; + size = bpc * fbfont->charcount; size += sizeof(struct sti_rom_font); nf = kzalloc(size, STI_LOWMEM); @@ -514,7 +514,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) return NULL; nf->first_char = 0; - nf->last_char = 255; + nf->last_char = fbfont->charcount - 1; nf->width = fbfont->width; nf->height = fbfont->height; nf->font_type = STI_FONT_HPROMAN8; @@ -525,7 +525,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) dest = nf; dest += sizeof(struct sti_rom_font); - memcpy(dest, fbfont->data, bpc*256); + memcpy(dest, fbfont->data, bpc * fbfont->charcount); cooked_font = kzalloc(sizeof(*cooked_font), GFP_KERNEL); if (!cooked_font) { @@ -660,7 +660,7 @@ static int sti_cook_fonts(struct sti_cooked_rom *cooked_rom, void sti_font_convert_bytemode(struct sti_struct *sti, struct sti_cooked_font *f) { unsigned char *n, *p, *q; - int size = f->raw->bytes_per_char * 256 + sizeof(struct sti_rom_font); + int size = f->raw->bytes_per_char * (f->raw->last_char + 1) + sizeof(struct sti_rom_font); struct sti_rom_font *old_font; if (sti->wordmode)