From patchwork Wed Jun 26 08:41:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13712408 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13DD2C27C4F for ; Wed, 26 Jun 2024 08:41:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB29C10E7C3; Wed, 26 Jun 2024 08:41:50 +0000 (UTC) Received: from gauss.telenet-ops.be (gauss.telenet-ops.be [195.130.132.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 71C1910E7C2 for ; Wed, 26 Jun 2024 08:41:49 +0000 (UTC) Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by gauss.telenet-ops.be (Postfix) with ESMTPS id 4W8FYR3h8qz4x4W4 for ; Wed, 26 Jun 2024 10:41:47 +0200 (CEST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:1dff:b715:1a2c:c3f5]) by laurent.telenet-ops.be with bizsmtp id g8hm2C00K0lK4vA018hmnr; Wed, 26 Jun 2024 10:41:47 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1sMODm-000OVn-F9; Wed, 26 Jun 2024 10:41:46 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1sMODq-00Aong-AJ; Wed, 26 Jun 2024 10:41:46 +0200 From: Geert Uytterhoeven To: Jocelyn Falempe , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/2] drm/panic: Do not select DRM_KMS_HELPER Date: Wed, 26 Jun 2024 10:41:44 +0200 Message-Id: <60155f8c939ed286e324a7c12a1daa69fe49fcf6.1719391132.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 . Fixes: bf9fb17c6672868d ("drm/panic: Add a drm panic handler") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe --- drivers/gpu/drm/Kconfig | 1 - drivers/gpu/drm/drm_panic.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index b903a2c0b5e8f95c..ce9bf2b6e9d332d4 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -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 diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c index 8d2eded1fd19ff6c..67f78b5a76b61e3d 100644 --- a/drivers/gpu/drm/drm_panic.c +++ b/drivers/gpu/drm/drm_panic.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #include From patchwork Wed Jun 26 08:41:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13712407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8AB30C30653 for ; Wed, 26 Jun 2024 08:41:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B05BB10E7C2; Wed, 26 Jun 2024 08:41:50 +0000 (UTC) Received: from weierstrass.telenet-ops.be (weierstrass.telenet-ops.be [195.130.137.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 74CAB10E7D4 for ; Wed, 26 Jun 2024 08:41:49 +0000 (UTC) Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by weierstrass.telenet-ops.be (Postfix) with ESMTPS id 4W8FYR4pxZz4x2dB for ; Wed, 26 Jun 2024 10:41:47 +0200 (CEST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:1dff:b715:1a2c:c3f5]) by albert.telenet-ops.be with bizsmtp id g8hm2C00G0lK4vA068hmGN; Wed, 26 Jun 2024 10:41:47 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1sMODm-000OVr-Fx; Wed, 26 Jun 2024 10:41:46 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1sMODq-00Aonj-By; Wed, 26 Jun 2024 10:41:46 +0200 From: Geert Uytterhoeven To: Jocelyn Falempe , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , kernel test robot Subject: [PATCH 2/2] drm/panic: Restrict graphical logo handling to built-in Date: Wed, 26 Jun 2024 10:41:45 +0200 Message-Id: <4009fca99a7c05f617cc9899c6d0a5748415595d.1719391132.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When 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. Fixes: 294bbd1f2697ff28 ("drm/panic: Add support for drawing a monochrome graphical logo") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406261341.GYsbLpN1-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c index 67f78b5a76b61e3d..948aed00595eb6dd 100644 --- a/drivers/gpu/drm/drm_panic.c +++ b/drivers/gpu/drm/drm_panic.c @@ -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)