Skip to content

console: Miscellaneous clean-ups, do not use FNTCHARCNT() in fbcon.c

Peilin Ye dri-devel linux-fbdev linux-parisc linux-usb lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest5 patches 12 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5console: Delete unused con_font_copy() callback implementationsdrivers/usb/misc/sisusbvga/sisusb_con.c drivers/video/console/dummycon.c drivers/video/fbdev/core/fbcon.c +2 more+1 -250 replies
2/5console: Delete dummy con_font_set() and con_font_default() callback implementationsdrivers/usb/misc/sisusbvga/sisusb_con.c drivers/video/console/dummycon.c+0 -290 replies
3/5Fonts: Add charcount field to font_descinclude/linux/font.h lib/fonts/font_10x18.c lib/fonts/font_6x10.c +11 more+14 -00 replies
4/5parisc/sticore: Avoid hard-coding built-in font charcountdrivers/video/console/sticore.c+4 -40 replies
5/5fbcon: Avoid using FNTCHARCNT() and hard-coded built-in font charcountdrivers/video/fbdev/core/fbcon.c drivers/video/fbdev/core/fbcon_rotate.c drivers/video/fbdev/core/tileblit.c+23 -410 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGreg Kroah-HartmanDaniel Vetter
SeriesR-b
1/5
2/5R-b
3/5R-b
4/5R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] console: Miscellaneous clean-ups, do not use FNTCHARCNT() in fbcon.c

Hi all,

This is a collection of some miscellaneous clean-ups for fbcon and some console drivers. Since v2, I rebased them on linux-next, added some
Reviewed-by: tags from Daniel and Greg, and rewrote the commit messages as suggested by Jiri. See [1] for v2 links.

It does the following:

- Garbage collect KD_FONT_OP_COPY callbacks since we disabled it recently. Mark it as obsolete.
- Delete dummy con_font_op() callbacks. (Reviewed by Greg)

- Add a charcount field to our new font descriptor, struct font_desc. (Reviewed by Daniel)
- Do not use a hard-coded 256 for built-in font charcount in console/sticore.c, use the new charcount field of struct font_desc instead. (Reviewed by Daniel)
- Similarly, in fbcon.c, avoid using the magic negative-indexing macro,

    FNTCHARCNT(). Set `vc->vc_font.charcount` properly and always use that
    instead.

Daniel, hopefully [5/5] removes FNTCHARCNT() for ever, but I have not tested it sufficiently yet. I remember you mentioned elsewhere that "fbtest.c" is insufficient for framebuffer testing, then how should we test it? The first 4 patches should be fine.

Please reference commit messages for more information. Thank you!

[1] v2 links:

2/5: https://lore.kernel.org/lkml/c5563eeea36aae7bd72ea2e985bc610d585ece40.1604306433.git.yepeilin.cs@gmail.com/
3/5: https://lore.kernel.org/lkml/[email protected]/
4/5: https://lore.kernel.org/lkml/c38042bbf5c9777c84900d56c09f3c156b32af48.1603788512.git.yepeilin.cs@gmail.com/
5/5: https://lore.kernel.org/lkml/[email protected]/

Peilin Ye (5):
console: Delete unused con_font_copy() callback implementations
console: Delete dummy con_font_set() and con_font_default() callback implementations
Fonts: Add charcount field to font_desc
parisc/sticore: Avoid hard-coding built-in font charcount
fbcon: Avoid using FNTCHARCNT() and hard-coded built-in font charcount

 drivers/usb/misc/sisusbvga/sisusb_con.c | 21 --------
 drivers/video/console/dummycon.c        | 20 --------
 drivers/video/console/sticore.c         |  8 +--
 drivers/video/fbdev/core/fbcon.c        | 68 ++++++++-----------------
 drivers/video/fbdev/core/fbcon_rotate.c |  3 +-
 drivers/video/fbdev/core/tileblit.c     |  4 +-
 include/linux/console.h                 |  1 -
 include/linux/font.h                    |  1 +
 include/uapi/linux/kd.h                 |  2 +-
 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 +
 22 files changed, 42 insertions(+), 99 deletions(-)
Signature · 6 lines
2.25.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel