From patchwork Wed Mar 16 18:36:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12783033 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 CA0C0C433EF for ; Wed, 16 Mar 2022 18:37:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0700110E92F; Wed, 16 Mar 2022 18:37:20 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 390FF10E92F for ; Wed, 16 Mar 2022 18:37:18 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 91083618B8; Wed, 16 Mar 2022 18:37:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BB06C340E9; Wed, 16 Mar 2022 18:37:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647455837; bh=AeOKmCyzq1uIA6ULnTh98t5emlpFl5gxplN7rmXD6BI=; h=From:To:Cc:Subject:Date:From; b=Qockax2Wfb9NicmpzRdcZsGmXxQ288gBYZ1jXZDnmCyNI5T0nA+duNoHrBT9avwLO cHBehu4dH8vAvxB1d87pIy4Ov4pfvc/FeQD3LLfMhNZl99EPVsAljonngYLtCErt97 s7ctPZUnA2QYbgyE3OIQdB7AN1JngCj2OqJAXvFwXImb9nW5PA9va3OsazHqNgjWXv uTktlMJ7CTXLAyQllkKGDxrajDY0i55gUpl223flIJQXH+Unat1Lm0L1EQdkCHAp2+ oAdoNjEusV0T7DUZFYsP+ojVz8hI3adWn3OWMrn55rr9XE/liQQSRJOUNKWiXIavGf jER51JVbhKioQ== From: Arnd Bergmann To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Thierry Reding Subject: [PATCH] drm/panel: add CONFIG_DRM_KMS_HELPER dependencies Date: Wed, 16 Mar 2022 19:36:46 +0100 Message-Id: <20220316183708.1505846-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 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: , Cc: Kees Cook , Arnd Bergmann , Jani Nikula , Dillon Min , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Douglas Anderson , Deepak Rawat , =?utf-8?q?Noralf_Tr=C3=B8nnes?= , Dmitry Baryshkov , AngeloGioacchino Del Regno , Alex Deucher , Lukas Bulwahn , Sam Ravnborg , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The driver fails to build when the KMS helpers are disabled: ld.lld: error: undefined symbol: drm_gem_fb_get_obj >>> referenced by drm_mipi_dbi.c >>> gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a >>> referenced by drm_mipi_dbi.c >>> gpu/drm/drm_mipi_dbi.o:(mipi_dbi_fb_dirty) in archive drivers/built-in.a ld.lld: error: undefined symbol: drm_gem_fb_begin_cpu_access >>> referenced by drm_mipi_dbi.c >>> gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a ld.lld: error: undefined symbol: drm_fb_swab >>> referenced by drm_mipi_dbi.c >>> gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a ld.lld: error: undefined symbol: drm_fb_xrgb8888_to_rgb565 >>> referenced by drm_mipi_dbi.c >>> gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a ld.lld: error: undefined symbol: drm_fb_memcpy >>> referenced by drm_mipi_dbi.c >>> gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a This is fairly hard to hit in randconfig drivers, but it eventually did trigger for me in a configuration where all other DRM drivers are loadable modules, but DRM_PANEL_WIDECHIPS_WS2401 was built-in. Adding a dependency in all drivers that select DRM_MIPI_DBI avoids the problem for now, adding the dependency in DRM_MIPI_DBI as well should help make it easier to figure out why it breaks if someone forgets the dependency the next time. Signed-off-by: Arnd Bergmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/Kconfig | 2 +- drivers/gpu/drm/panel/Kconfig | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) I see this warning on 5.17-rc8, but did not test it on linux-next, which may already have a fix. diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index b1f22e457fd0..d5ec0b77c010 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -30,7 +30,7 @@ menuconfig DRM config DRM_MIPI_DBI tristate - depends on DRM + depends on DRM_KMS_HELPER config DRM_MIPI_DSI bool diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 0aec5a10b064..96887d0efb9f 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -425,6 +425,7 @@ config DRM_PANEL_SAMSUNG_DB7430 tristate "Samsung DB7430-based DPI panels" depends on OF && SPI && GPIOLIB depends on BACKLIGHT_CLASS_DEVICE + depends on DRM_KMS_HELPER select DRM_MIPI_DBI help Say Y here if you want to enable support for the Samsung @@ -440,6 +441,7 @@ config DRM_PANEL_SAMSUNG_S6D16D0 config DRM_PANEL_SAMSUNG_S6D27A1 tristate "Samsung S6D27A1 DPI panel driver" depends on OF && SPI && GPIOLIB + depends on DRM_KMS_HELPER select DRM_MIPI_DBI help Say Y here if you want to enable support for the Samsung @@ -476,6 +478,7 @@ config DRM_PANEL_SAMSUNG_S6E63M0_SPI depends on SPI depends on DRM_PANEL_SAMSUNG_S6E63M0 default DRM_PANEL_SAMSUNG_S6E63M0 + depends on DRM_KMS_HELPER select DRM_MIPI_DBI help Say Y here if you want to be able to access the Samsung @@ -677,6 +680,7 @@ config DRM_PANEL_WIDECHIPS_WS2401 tristate "Widechips WS2401 DPI panel driver" depends on SPI && GPIOLIB depends on BACKLIGHT_CLASS_DEVICE + depends on DRM_KMS_HELPER select DRM_MIPI_DBI help Say Y here if you want to enable support for the Widechips WS2401 DPI