From patchwork Mon Sep 27 14:28:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12520063 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A13D4C433EF for ; Mon, 27 Sep 2021 14:28:23 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3E0BA6108E for ; Mon, 27 Sep 2021 14:28:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3E0BA6108E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A2F189FA5; Mon, 27 Sep 2021 14:28:22 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id A463B89FA5 for ; Mon, 27 Sep 2021 14:28:21 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 5E11F610E8; Mon, 27 Sep 2021 14:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632752901; bh=5KL+JiULkFsiAbh9kDxX+k4YOM3LnpWkWceqNENywSw=; h=From:To:Cc:Subject:Date:From; b=lxzA0fXgPKw9xlD13FdD6gFz9FpAdgQRFrWR+k070lCUmY6OqQObR/WU+zN8Nxw1j tuLdF/3BruQ7i8vZpaMF36FkOVkQLMRbPMqH1hAMcGMGbS0saXphLZBxvliAtwngLw ZuUjUQjmbwcCZrKIL0wwd1qpopCSbpecqoN+ZlufludMS8FApmE/bpzt0GphapokiW ouRk4y1TQmsOTVPC7zIiyNZYRgLM2Q1kRYJYadH+AUi/97Sv4gWaNKKUEqrKb0p+DK P15IRtkAeY6wi+c2yMiltL+SSFZX8/PFijBf1Dz2mo4jGnDWAj0CDnq2oV7zupvFK6 axD5GNXZZxTrQ== From: Arnd Bergmann To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Kees Cook Cc: Arnd Bergmann , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] [RESEND] drm: fb_helper: fix CONFIG_FB dependency Date: Mon, 27 Sep 2021 16:28:02 +0200 Message-Id: <20210927142816.2069269-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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann With CONFIG_FB=m and CONFIG_DRM=y, we get a link error in the fb helper: aarch64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_alloc_fbi': (.text+0x10cc): undefined reference to `framebuffer_alloc' Tighten the dependency so it is only allowed in the case that DRM can link against FB. Fixes: f611b1e7624c ("drm: Avoid circular dependencies for CONFIG_FB") Link: https://lore.kernel.org/all/20210721152211.2706171-1-arnd@kernel.org/ Signed-off-by: Arnd Bergmann Reviewed-by: Kees Cook Acked-by: Jani Nikula Reviewed-by: Javier Martinez Canillas --- I posted this in July, the patch is still required and should work on its own. --- drivers/gpu/drm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index cea777ae7fb9..9199f53861ca 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -103,7 +103,7 @@ config DRM_DEBUG_DP_MST_TOPOLOGY_REFS config DRM_FBDEV_EMULATION bool "Enable legacy fbdev support for your modesetting driver" depends on DRM - depends on FB + depends on FB=y || FB=DRM select DRM_KMS_HELPER select FB_CFB_FILLRECT select FB_CFB_COPYAREA