linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Peilin Ye <yepeilin.cs@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Jiri Slaby <jirislaby@kernel.org>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] Preparation work for using font_desc in vc_data
Date: Mon, 2 Nov 2020 16:01:07 +0100	[thread overview]
Message-ID: <20201102150107.GT401619@phenom.ffwll.local> (raw)
In-Reply-To: <cover.1603788511.git.yepeilin.cs@gmail.com>

On Tue, Oct 27, 2020 at 12:27:35PM -0400, Peilin Ye wrote:
> 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 :)

Btw nitpeek on how you submit patches: The threading you're using here is
"deep" i.e. every patch is  reply to the previous patch. The usual thing
is flat, i.e. all patches are replies to the cover letter.

I think only very old versions of git had the former as a default, so not
sure what's going on. But the deep threading makes piecing the
conversation together quite a bit harder, at least here in mutt.
-Daniel


> 
> 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
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

      parent reply	other threads:[~2020-11-02 15:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 16:27 [PATCH 0/5] Preparation work for using font_desc in vc_data Peilin Ye
2020-10-27 16:31 ` [PATCH 1/5] fbdev/atafb: Remove unused extern variables Peilin Ye
2020-10-27 16:33   ` [PATCH 2/5] Fonts: Make font size unsigned in font_desc Peilin Ye
2020-10-27 16:34     ` [PATCH 3/5] Fonts: Add charcount field to font_desc Peilin Ye
2020-10-27 16:37       ` [PATCH 4/5] fbcon: Avoid hard-coding built-in font charcount Peilin Ye
2020-10-27 16:41         ` [PATCH 5/5] parisc/sticore: " Peilin Ye
2020-10-27 19:18           ` Daniel Vetter
2020-10-27 19:13         ` [PATCH 4/5] fbcon: " Daniel Vetter
2020-10-28  5:30           ` Peilin Ye
2020-10-28 15:51         ` [PATCH RFC v2 4/5] fbdev: Avoid using FNTCHARCNT() and hard-coded " Peilin Ye
2020-10-27 18:59       ` [PATCH 3/5] Fonts: Add charcount field to font_desc Daniel Vetter
2020-10-28  6:11         ` Peilin Ye
2020-10-28  6:05       ` [PATCH 3/5 v2] " Peilin Ye
2020-11-02 15:03         ` Daniel Vetter
2020-10-27 18:50     ` [PATCH 2/5] Fonts: Make font size unsigned in font_desc Daniel Vetter
2020-10-28  5:43       ` Peilin Ye
2020-10-28  8:18         ` Daniel Vetter
2020-10-28 10:30           ` Peilin Ye
2020-10-28 10:56     ` [PATCH v2 " Peilin Ye
2020-10-28 18:40       ` Daniel Vetter
2020-10-27 18:44   ` [PATCH 1/5] fbdev/atafb: Remove unused extern variables Daniel Vetter
2020-10-28  9:59   ` Geert Uytterhoeven
2020-10-28 19:25   ` Thomas Zimmermann
2020-10-27 16:50 ` Following up Peilin Ye
2020-10-27 18:36   ` Daniel Vetter
2020-10-28  5:34     ` Peilin Ye
2020-11-02 15:01 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201102150107.GT401619@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yepeilin.cs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).