From patchwork Wed May 27 13:31:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11572981 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 39BA7912 for ; Wed, 27 May 2020 13:32:21 +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 22886207CB for ; Wed, 27 May 2020 13:32:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22886207CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CBB686E2F3; Wed, 27 May 2020 13:32:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 99D576E2F3 for ; Wed, 27 May 2020 13:32:16 +0000 (UTC) Received: from localhost.localdomain ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MmUDf-1jDuoj0QoT-00iQ43; Wed, 27 May 2020 15:32:00 +0200 From: Arnd Bergmann To: Eric Anholt , David Airlie , Daniel Vetter , Rob Herring , Sam Ravnborg , Linus Walleij Subject: [PATCH] drm: pl111: add CONFIG_VEXPRESS_CONFIG dependency Date: Wed, 27 May 2020 15:31:42 +0200 Message-Id: <20200527133158.462057-1-arnd@arndb.de> X-Mail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+sJb5ggeD5JqTex s/WCILNzoM35lvR4Nj7cicaR77pmnGvEaZKg4i+pgvJdQw3UoFH6wn6uYfl4lYipnNFXqExwx y7jJXkJOn7qpnUBGLL+BNUYQodYiMb4NwUl4oWjigAoX1E/7dA= 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: Alex Deucher , dri-devel@lists.freedesktop.org, Arnd Bergmann , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The vexpress_config code fails to link in some configurations: drivers/gpu/drm/pl111/pl111_versatile.o: in function `pl111_versatile_init': (.text+0x1f0): undefined reference to `devm_regmap_init_vexpress_config' Add a dependency that links to this only if the dependency is there, and prevent the configuration where the drm driver is built-in but the config is a loadable module. Fixes: 826fc86b5903 ("drm: pl111: Move VExpress setup into versatile init") Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij --- drivers/gpu/drm/pl111/Kconfig | 1 + drivers/gpu/drm/pl111/pl111_versatile.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/pl111/Kconfig b/drivers/gpu/drm/pl111/Kconfig index 80f6748055e3..33a005816fdd 100644 --- a/drivers/gpu/drm/pl111/Kconfig +++ b/drivers/gpu/drm/pl111/Kconfig @@ -3,6 +3,7 @@ config DRM_PL111 tristate "DRM Support for PL111 CLCD Controller" depends on DRM depends on ARM || ARM64 || COMPILE_TEST + depends on VEXPRESS_CONFIG || !VEXPRESS_CONFIG depends on COMMON_CLK select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER diff --git a/drivers/gpu/drm/pl111/pl111_versatile.c b/drivers/gpu/drm/pl111/pl111_versatile.c index 64f01a4e6767..451d74205108 100644 --- a/drivers/gpu/drm/pl111/pl111_versatile.c +++ b/drivers/gpu/drm/pl111/pl111_versatile.c @@ -476,7 +476,8 @@ int pl111_versatile_init(struct device *dev, struct pl111_drm_dev_private *priv) versatile_clcd_type = (enum versatile_clcd)clcd_id->data; /* Versatile Express special handling */ - if (versatile_clcd_type == VEXPRESS_CLCD_V2M) { + if (IS_ENABLED(CONFIG_VEXPRESS_CONFIG) && + versatile_clcd_type == VEXPRESS_CLCD_V2M) { int ret = pl111_vexpress_clcd_init(dev, np, priv); of_node_put(np); if (ret)