linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: "Dr. David Alan Gilbert" <linux@treblig.org>,
	npiggin@gmail.com, christophe.leroy@csgroup.eu, sam@ravnborg.org,
	benh@kernel.crashing.org
Cc: rdunlap@infradead.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] powerpc: Use shared font data
Date: Thu, 24 Aug 2023 20:01:53 +1000	[thread overview]
Message-ID: <87msygvjvy.fsf@mail.lhotse> (raw)
In-Reply-To: <ZOY0dANP4s3L3VyX@gallifrey>

"Dr. David Alan Gilbert" <linux@treblig.org> writes:
> * linux@treblig.org (linux@treblig.org) wrote:
>> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>> 
>> PowerPC has a 'btext' font used for the console which is almost identical
>> to the shared font_sun8x16, so use it rather than duplicating the data.
>> 
>> They were actually identical until about a decade ago when
>>    commit bcfbeecea11c ("drivers: console: font_: Change a glyph from
>>                         "broken bar" to "vertical line"")
>> 
>> which changed the | in the shared font to be a solid
>> bar rather than a broken bar.  That's the only difference.
>> 
>> This was originally spotted by the PMF source code analyser, which
>> noticed that sparc does the same thing with the same data, and they
>> also share a bunch of functions to manipulate the data.  I've previously
>> posted a near identical patch for sparc.
>> 
>> Tested very lightly with a boot without FS in qemu.
>> 
>> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
>
> Hi Michael,
>   Just checking, is there anything else I need to do here?
   
I felt like the lib/fonts/Kconfig change could be cleaner, but the
existing Kconfig is not well structured for what we want to do.

I think at least it could be simplified to:

config FONT_SUN8x16
	bool "Sparc console 8x16 font"
	depends on (FRAMEBUFFER_CONSOLE && (FONTS || SPARC)) || BOOTX_TEXT


cheers


>> diff --git a/lib/fonts/Kconfig b/lib/fonts/Kconfig
>> index c035fde66aebe..1804abe08ffe4 100644
>> --- a/lib/fonts/Kconfig
>> +++ b/lib/fonts/Kconfig
>> @@ -98,7 +98,8 @@ config FONT_10x18
>>  
>>  config FONT_SUN8x16
>>  	bool "Sparc console 8x16 font"
>> -	depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)
>> +	depends on (FRAMEBUFFER_CONSOLE || BOOTX_TEXT) &&\
>> +	           (!SPARC && FONTS || SPARC || PPC)
>>  	help
>>  	  This is the high resolution console font for Sun machines. Say Y.
>>  

  reply	other threads:[~2023-08-24 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12  1:02 [PATCH v3] powerpc: Use shared font data linux
2023-08-23 16:31 ` Dr. David Alan Gilbert
2023-08-24 10:01   ` Michael Ellerman [this message]
2023-08-24 12:46     ` Dr. David Alan Gilbert

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=87msygvjvy.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=rdunlap@infradead.org \
    --cc=sam@ravnborg.org \
    /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).