drm/panic: Miscellaneous fixes
Subsystems (3)
cover drm/panic: Miscellaneous fixes
Hi all,
Here are two more fixes for the DRM panic code.
Thanks for your comments!
Geert Uytterhoeven (2):
drm/panic: Do not select DRM_KMS_HELPER drm/panic: Restrict graphical logo handling to built-in
drivers/gpu/drm/Kconfig | 1 - drivers/gpu/drm/drm_panic.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-)
Signature · 12 lines
2.34.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsPATCH 1/2 drm/panic: Do not select DRM_KMS_HELPER
DRM core code cannot call into DRM helper code, as this would lead to circular references in the modular case. Hence drop the selection of DRM_KMS_HELPER. It was unused anyway, as v10 switched from using the DRM format helpers to its own color format conversion, cfr. commit 9544309775c334c9 ("drm/panic: Add support for color format conversion")).
Remove the unneeded include of <drm/drm_format_helper.h>.
--- drivers/gpu/drm/Kconfig | 1 - drivers/gpu/drm/drm_panic.c | 1 - 2 files changed, 2 deletions(-)
drivers/gpu/drm/Kconfig +0 -1
@@ -108,7 +108,6 @@ config DRM_KMS_HELPER config DRM_PANIC bool "Display a user-friendly message when a kernel panic occurs" depends on DRM && !(FRAMEBUFFER_CONSOLE && VT_CONSOLE) - select DRM_KMS_HELPER select FONT_SUPPORT help Enable a drm panic handler, which will display a user-friendly message
drivers/gpu/drm/drm_panic.c +0 -1
@@ -20,7 +20,6 @@#include <linux/types.h> #include <drm/drm_drv.h> -#include <drm/drm_format_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h> #include <drm/drm_modeset_helper_vtables.h>
Signature · 1 line
2.34.1
Re: [PATCH 1/2] drm/panic: Do not select DRM_KMS_HELPER
Quoted 6 lines · Geert Uytterhoeven
DRM core code cannot call into DRM helper code, as this would lead to circular references in the modular case. Hence drop the selection of
DRM_KMS_HELPER. It was unused anyway, as v10 switched from using the DRM format helpers to its own color format conversion, cfr. commit9544309775c334c9("drm/panic: Add support for color format conversion")).
Thanks a lot for this cleanup,
Quoted 34 lines
Remove the unneeded include of <
drm/drm_format_helper.h>.Fixes bf9fb17c6672868d ("drm/panic: Add a drm panic handler")Signed-off-by Geert Uytterhoeven <[email protected]>--- drivers/gpu/drm/Kconfig | 1 - drivers/gpu/drm/drm_panic.c | 1 - 2 files changed, 2 deletions(-)drivers/gpu/drm/Kconfig +0
-1@@ -108,7 +108,6 @@ config DRM_KMS_HELPER config DRM_PANIC bool "Display a user-friendly message when a kernel panic occurs" depends on DRM && !(FRAMEBUFFER_CONSOLE && VT_CONSOLE) - select DRM_KMS_HELPER select FONT_SUPPORT help Enable a drm panic handler, which will display a user-friendly messagedrivers/gpu/drm/drm_panic.c +0
-1@@ -20,7 +20,6 @@#include <linux/types.h> #include <drm/drm_drv.h> -#include <drm/drm_format_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h> #include <drm/drm_modeset_helper_vtables.h>
PATCH 2/2 drm/panic: Restrict graphical logo handling to built-in
In reply to Geert UytterhoevenWhen CONFIG_DRM_PANIC=y, but CONFIG_DRM=m:
ld: drivers/gpu/drm/drm_panic.o: in function `drm_panic_setup_logo':
drivers/gpu/drm/drm_panic.c:99: multiple definition of `init_module'; drivers/gpu/drm/drm_drv.o:drivers/gpu/drm/drm_drv.c:1079: first defined here
Fix this by restricting the graphical logo handling and its device_initcall() to the built-in case. Logos are freed during late kernel initialization, so they are no longer available at module load time anyway.
--- drivers/gpu/drm/drm_panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_panic.c +1 -1
@@ -91,7 +91,7 @@ static const struct drm_panic_line logo_ascii[] = { PANIC_LINE(" \\___)=(___/"), }; -#ifdef CONFIG_LOGO +#if defined(CONFIG_LOGO ) && !defined(MODULE )static const struct linux_logo *logo_mono;static int drm_panic_setup_logo (void )
Signature · 1 line
2.34.1
Re: [PATCH 2/2] drm/panic: Restrict graphical logo handling to built-in
Quoted 9 lines · Geert Uytterhoeven
When
CONFIG_DRM_PANIC=y, butCONFIG_DRM=m:ld:
drivers/gpu/drm/drm_panic.o: in function `drm_panic_setup_logo':
drivers/gpu/drm/drm_panic.c:99: multiple definition of `init_module'; drivers/gpu/drm/drm_drv.o:drivers/gpu/drm/drm_drv.c:1079: first defined hereFix this by restricting the graphical logo handling and its
device_initcall()to the built-in case. Logos are freed during late kernel initialization, so they are no longer available at module load time anyway.
Thanks a lot for this fix.
Quoted 22 lines
Fixes 294bbd1f2697ff28 ("drm/panic: Add support for drawing a monochrome graphical logo")Reported-by kernel test robot <[email protected]>Signed-off-by Geert Uytterhoeven <[email protected]>--- drivers/gpu/drm/drm_panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_panic.c +1
-1@@ -91,7 +91,7 @@ static const struct drm_panic_line logo_ascii[] = { PANIC_LINE(" \\___)=(___/"), }; -#ifdef CONFIG_LOGO +#if defined(CONFIG_LOGO ) && !defined(MODULE )static const struct linux_logo *logo_mono;static int drm_panic_setup_logo (void )
Jocelyn Falempe
maintainerQuoted 5 lines · Geert Uytterhoeven
Hi all,
Here are two more fixes for the DRM panic code.
Thanks for your comments!
Thanks for your fixes, they are now in drm-misc-next.
Best regards,
Signature · 1 line
Jocelyn
Quoted 9 lines
Geert Uytterhoeven (2):
drm/panic: Do not selectDRM_KMS_HELPERdrm/panic: Restrict graphical logo handling to built-indrivers/gpu/drm/Kconfig | 1 - drivers/gpu/drm/drm_panic.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-)