diff mbox series

[v2,3/7] lib/fonts: Fix visiblity of SUN12x22 and TER16x32 if DRM_PANIC

Message ID ac474c6755800e61e18bd5af407c6acb449c5149.1718305355.git.geert+renesas@glider.be (mailing list archive)
State Awaiting Upstream
Headers show
Series drm/panic: Fixes and graphical logo | expand

Commit Message

Geert Uytterhoeven June 13, 2024, 7:18 p.m. UTC
When CONFIG_FONTS ("Select compiled-in fonts") is not enabled, the user
should not be asked about any fonts.  However, when CONFIG_DRM_PANIC is
enabled, the user is still asked about the Sparc console 12x22 and
Terminus 16x32 fonts.

Fix this by moving the "|| DRM_PANIC" to where it belongs.
Split the dependency in two rules to improve readability.

Fixes: b94605a3889b9084 ("lib/fonts: Allow to select fonts for drm_panic")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - New.
---
 lib/fonts/Kconfig | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jocelyn Falempe June 14, 2024, 9:40 a.m. UTC | #1
On 13/06/2024 21:18, Geert Uytterhoeven wrote:
> When CONFIG_FONTS ("Select compiled-in fonts") is not enabled, the user
> should not be asked about any fonts.  However, when CONFIG_DRM_PANIC is
> enabled, the user is still asked about the Sparc console 12x22 and
> Terminus 16x32 fonts.
> 
> Fix this by moving the "|| DRM_PANIC" to where it belongs.
> Split the dependency in two rules to improve readability.

Sorry I think I misunderstood the SPARC && FONTS condition.
Your fix is much clearer, thanks.

Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>

> 
> Fixes: b94605a3889b9084 ("lib/fonts: Allow to select fonts for drm_panic")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v2:
>    - New.
> ---
>   lib/fonts/Kconfig | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/fonts/Kconfig b/lib/fonts/Kconfig
> index befcb463f7381d1a..3ac26bdbc3ff01a3 100644
> --- a/lib/fonts/Kconfig
> +++ b/lib/fonts/Kconfig
> @@ -105,7 +105,8 @@ config FONT_SUN8x16
>   
>   config FONT_SUN12x22
>   	bool "Sparc console 12x22 font (not supported by all drivers)"
> -	depends on (FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)) || DRM_PANIC
> +	depends on FRAMEBUFFER_CONSOLE || DRM_PANIC
> +	depends on !SPARC && FONTS
>   	help
>   	  This is the high resolution console font for Sun machines with very
>   	  big letters (like the letters used in the SPARC PROM). If the
> @@ -113,7 +114,8 @@ config FONT_SUN12x22
>   
>   config FONT_TER16x32
>   	bool "Terminus 16x32 font (not supported by all drivers)"
> -	depends on (FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)) || DRM_PANIC
> +	depends on FRAMEBUFFER_CONSOLE || DRM_PANIC
> +	depends on !SPARC && FONTS || SPARC
>   	help
>   	  Terminus Font is a clean, fixed width bitmap font, designed
>   	  for long (8 and more hours per day) work with computers.
diff mbox series

Patch

diff --git a/lib/fonts/Kconfig b/lib/fonts/Kconfig
index befcb463f7381d1a..3ac26bdbc3ff01a3 100644
--- a/lib/fonts/Kconfig
+++ b/lib/fonts/Kconfig
@@ -105,7 +105,8 @@  config FONT_SUN8x16
 
 config FONT_SUN12x22
 	bool "Sparc console 12x22 font (not supported by all drivers)"
-	depends on (FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)) || DRM_PANIC
+	depends on FRAMEBUFFER_CONSOLE || DRM_PANIC
+	depends on !SPARC && FONTS
 	help
 	  This is the high resolution console font for Sun machines with very
 	  big letters (like the letters used in the SPARC PROM). If the
@@ -113,7 +114,8 @@  config FONT_SUN12x22
 
 config FONT_TER16x32
 	bool "Terminus 16x32 font (not supported by all drivers)"
-	depends on (FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)) || DRM_PANIC
+	depends on FRAMEBUFFER_CONSOLE || DRM_PANIC
+	depends on !SPARC && FONTS || SPARC
 	help
 	  Terminus Font is a clean, fixed width bitmap font, designed
 	  for long (8 and more hours per day) work with computers.