Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp430282pxx; Wed, 28 Oct 2020 08:10:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdeWgG9obZkQP0CTSaYGTbmUGcBX8nOi+4V3+w27eEsZsWxg9Wt/X/QSHSuN3nTJHWeZB0 X-Received: by 2002:a05:6402:cac:: with SMTP id cn12mr8148639edb.326.1603897857988; Wed, 28 Oct 2020 08:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603897857; cv=none; d=google.com; s=arc-20160816; b=jp7YrMQcm9RaYuLgbF1hYIE59GH6BQmDUEZjcmcfLOMm2RUrpU8cSt3eZ0B7Z6cfP9 dTpWCLQttamUHHFlK8b+mDVyX5peCD/nqo5XcIdX/unf9MKF7J8uO77mfk0mU+LlKmce FtAqZbbT/ZiEwy+p9gI4RTQdE8tg4MFiQU2c3iRRAzFAS/zi754anCSb6xa8nCAvVck1 26eLOMZcT4ymXPJUQOJTblWPkcUYoOcF0jKcyo0UkBLDrdQozuSkIxJr93isRMmesvP2 9HqtE6wdscq/bmVCSQXm9xnHhseyaYwwgCdjU02cybbCDFavasX+sCu0MQ53u2jYJyxN PF8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=mYpVVa2HzoWSN3SBz42ImmD/sC2oukyTEj/vYph3n2U=; b=wiEJzI4jkovMJW8PGbxVw9kJ2PJfuc8/aT/D1IZq5VRZ3MCWXcz8gJILNs4CKy9Dt+ nirHS06b5XNJy5nPfHdmxJI1HTGcSm9UJFgkALsqB5XFlf3d+5+4as6SEitfAAtDHOij xhRXVFthQ3OiheYdd1N3ffBvK0pBap41HiwoFIo45gpECpD+Or7mIZH4eNyfmn7xvGau gOTpLdXXJXcLfnB27lVto/Ze5LefAdAGfbQa+uX7nQcvgOyePXYut4VWwMoq67xpLiw7 3pdGOHFS0KoAPCLMxUCoLYLyoZ9zEQqF8U9FWeuI+oXycoTl7stn4FMSZITo1x8Pc7Yk x6YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JGGtiwD2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si3473416ejm.389.2020.10.28.08.10.34; Wed, 28 Oct 2020 08:10:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JGGtiwD2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2900797AbgJ0Qah (ORCPT + 99 others); Tue, 27 Oct 2020 12:30:37 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35632 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760746AbgJ0Qa0 (ORCPT ); Tue, 27 Oct 2020 12:30:26 -0400 Received: by mail-pg1-f194.google.com with SMTP id f38so1098621pgm.2; Tue, 27 Oct 2020 09:30:26 -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:mime-version :content-transfer-encoding; bh=mYpVVa2HzoWSN3SBz42ImmD/sC2oukyTEj/vYph3n2U=; b=JGGtiwD26RZLnpx6yWtGjSdavx4m1/lbKn4+xZtXTR+oITifCFyWksbePNwPRLAo/K OuSem10v8zs01o5RNoD+4DIOB088wIP1aI49EGK+RwqFfaxrK9hGEAy7NPjTyPi1/gdu lZI+jjZt9yHOrOF7KYdNWzBa15UO87BPiEG+PilCwBVqmav9TWSGzeWd3Hd2FOBx6blq IM8kUIcF/MRnJkDsa6Hu66w6w5ZWVi1dJGct8syt5hOl1co2CHOEnBzQ4AwfuYHRK/1I lD6plgXtirHy9lyijxWmzciSgQrPffGU0bbf/xRJ1Fmq+i7HoJLtXlrn3Yu1Z1lCB78e P0Mg== 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:mime-version :content-transfer-encoding; bh=mYpVVa2HzoWSN3SBz42ImmD/sC2oukyTEj/vYph3n2U=; b=HPy0BcGxgFLZsIFW2hWuT0KoTd2Ss1BcmEU/VO1L2099kyU4/F78cdTgIb5Ed7Izdx AwT3d8waMk0YCZ+Jz1xp6xjpMvXxG2AZBWl/n5SMM6PXiduOH4yte0KC78bFn9oyjK++ tl/D8XlK7G2egeBQPz+fPLFyo/Ml/obL7GSXqUZ6Pe342x0BQnZ+aaxihBggYeaDIbZ9 PJ/K6wO0jTq9jpflgmb82tlNOZ+TfcORdArFQKzsDDKU4K7CJVu0VRMmaLtA2435ECPv K+y4fbMbOqPW8qL/sJIN377edcblaGDam0V4y+Rh1mhRid2UtGacCqYbFK0mBd6Mf7WL A5Uw== X-Gm-Message-State: AOAM5320p9Q2wlLX1oF5FrV1jzn4BctHmTnjtKrXN8Ozjnp4oVJq1WW0 vtrn8I1RUlBTmTs2RAF5g6QqYTXZ4jt2 X-Received: by 2002:a63:354c:: with SMTP id c73mr2722208pga.315.1603816226234; Tue, 27 Oct 2020 09:30:26 -0700 (PDT) Received: from localhost.localdomain (n11212042025.netvigator.com. [112.120.42.25]) by smtp.gmail.com with ESMTPSA id e23sm2773147pfi.191.2020.10.27.09.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 09:30:25 -0700 (PDT) From: Peilin Ye To: Daniel Vetter , Greg Kroah-Hartman Cc: Bartlomiej Zolnierkiewicz , Jiri Slaby , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Peilin Ye Subject: [PATCH 0/5] Preparation work for using font_desc in vc_data Date: Tue, 27 Oct 2020 12:27:35 -0400 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, Hi Greg, Hi all, We are planning to use `font_desc` instead of `console_font` in `vc_data`, and this is just some prep work for it. It doesn't do much, but at least it removes two "FIXME"s in fbcon.c :) Peilin Ye (5): [1/5] fbdev/atafb: Remove unused extern variables Searching for `fontdata` gave me this in fbdev/atafb.c: extern unsigned char fontdata_8x8[]; extern unsigned char fontdata_8x16[]; ...which freaked me out, since in 6735b4632def ("Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts") I changed them from char arrays to structures, in lib/fonts/. Fortunately it turns out these extern variables have nothing to do with lib/fonts/, and are not being used anywhere, so remove them for less confusion. m68k cross-compiled. [2/5] Fonts: Make font size unsigned in font_desc Our goal is to use `font_desc` "everywhere" in the kernel, and signed `width` and `height` is inappropriate. Also, change some printk() format identifiers in console/sticore.c from `%d` to `%u`. parisc cross-compiled. [3/5] Fonts: Add charcount field to font_desc Add `unsigned int charcount` to `font_desc`, and update each of our 13 built-in fonts. [4/5] fbcon: Avoid hard-coding built-in font charcount [5/5] parisc/sticore: Avoid hard-coding built-in font charcount Everyone (tty, fbcon, sticore, etc.) is assuming that all built-in fonts have 256 characters, and is using hard-coded 256 or 255 everywhere. These two patches removes some of them. [5/5] is parisc cross-compiled. Now is a good time to review all find_font() and get_default_font() callers: drivers/media/pci/solo6x10/solo6x10-enc.c 133 const struct font_desc *vga = find_font("VGA8x16"); drivers/media/test-drivers/vimc/vimc-core.c 268 const struct font_desc *font = find_font("VGA8x16"); drivers/media/test-drivers/vivid/vivid-core.c 1928 const struct font_desc *font = find_font("VGA8x16"); drivers/usb/misc/sisusbvga/sisusb.c 2285 myfont = find_font("VGA8x16"); * These 4 only care about font VGA8x16, so let them be for now; drivers/video/console/sticore.c 499 fbfont = find_font(fbfont_name); drivers/video/console/sticore.c 501 fbfont = get_default_font(1024,768, ~(u32)0, ~(u32)0); * Uses 255 and 256, (hopefully) cleaned up by [5/5]; drivers/video/fbdev/core/fbcon.c 999 if (!fontname[0] || !(font = find_font(fontname))) drivers/video/fbdev/core/fbcon.c 1000 font = get_default_font(info->var.xres, drivers/video/fbdev/core/fbcon.c 1078 if (!fontname[0] || !(font = find_font(fontname))) drivers/video/fbdev/core/fbcon.c 1079 font = get_default_font(info->var.xres, * Use 256, cleaned up by [4/5]; drivers/video/fbdev/core/fbcon.c 2548 else if (!(f = find_font(name))) drivers/video/fbdev/core/fbcon.c 2546 f = get_default_font(info->var.xres, info->var.yres, * Uses 256 but no easy fix. I'll clean this up after making fbcon_do_set_font() pass a `font_desc` as parameter; drivers/firmware/efi/earlycon.c 234 font = get_default_font(xres, yres, -1, -1); * Does not care about charcount. Thank you! Peilin Ye drivers/video/console/sticore.c | 10 +++++----- drivers/video/fbdev/atafb.c | 8 -------- drivers/video/fbdev/core/fbcon.c | 5 ++--- include/linux/font.h | 3 ++- 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 + 17 files changed, 22 insertions(+), 17 deletions(-) -- 2.25.1