From patchwork Tue Jun 20 20:16:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 106019 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1583415qgd; Tue, 20 Jun 2017 13:18:26 -0700 (PDT) X-Received: by 10.99.95.216 with SMTP id t207mr28395231pgb.19.1497989906433; Tue, 20 Jun 2017 13:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497989906; cv=none; d=google.com; s=arc-20160816; b=Gem0duYpRJiqguXDk+8CPTaxNopYBiHEXBNQyBjt5236IfkMnwDVAEpBvJMGCDbqOD ryBVrZ1SEmRq8uL0Fe0CH5oMBdub/Fy9WJCarD+NHUQ8z05xBSVeqFrNhUhUg4VjFd4E aYrL9tldFcri8Z+RK7F3WKTHuCd1/io2Ik8tnNU6E5HEQfd2jv10uR9xQwNFT7YaX8Io KRI0L3bQoq7wKlQJ/lus9HeKD00lorjGn9T6UfcrPBs3nuWEx+YBcyv2cSYD+9F+DbLK s8rXTSlXeB1h/Hm4co8C46b1cb/C1wlKEcvTx1guN+7dzka9/bHZyGho+jd5eQMPNQ12 jiTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=GU0ddlg2RnoX1fhwsOkUJIlyLzTLjviMVTpj0cdWuzU=; b=Ko12dPBVKI4QXn/y+vd57GUXD7uvg7oNI2t0qno3o2yckJrBQ0Zk6a2l/Ig6+ojq9x JiGWZEMq/0Gyre0K1uGYJotFWWnLgkPRsdrKLblvqvKx08LZ3aHq1jmmRLgXFItkzHIo UMbf53I+Of7wOESZNyNalEyrNfrMwTF6DJP+9svtDgpHCZQjVkZlx+rActq4P5AvKFO5 QxBptNLA9f8qK4h5EdryNBoxR3mFi+w1S+Lsr5Stf//Njxd0AeIAr4P4COEjdG0ywNsv ANA8MgkdqHy3gCQskVobXXBhmN/x5vilMPfHYDqmR4Ghms3LyaIR6BHfCmpXHl8vXlZA 4a7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d124si11525182pgc.156.2017.06.20.13.18.26; Tue, 20 Jun 2017 13:18:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752007AbdFTUSZ (ORCPT + 10 others); Tue, 20 Jun 2017 16:18:25 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:63148 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751639AbdFTUSY (ORCPT ); Tue, 20 Jun 2017 16:18:24 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0MRD6F-1dDtzE21Ql-00UZjg; Tue, 20 Jun 2017 22:17:59 +0200 From: Arnd Bergmann To: Rob Clark Cc: Jordan Crouse , Bjorn Andersson , Arnd Bergmann , David Airlie , Srinivas Kandagatla , Daniel Vetter , Archit Taneja , Eric Anholt , Sushmita Susheelendra , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drm/msm: gpu: call qcom_mdt interfaces only for ARCH_QCOM Date: Tue, 20 Jun 2017 22:16:51 +0200 Message-Id: <20170620201720.225593-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170620201720.225593-1-arnd@arndb.de> References: <20170620201720.225593-1-arnd@arndb.de> X-Provags-ID: V03:K0:uhxBazX4VSdSataU5/CEIHYTJ0Dlj9ylJAGoTsvcxRmrXyTY5Be Jbur4K6KR/Wp7P+xMLN17yBwwi9yMZErdcKSy9cM2fP3aejjb//Qxl2BSvj+aowqtj0zNrh xbH0eBKlpXeIkQ/2psQzhQajXgGV0GSKCMJJQA+S+o/ano7mSxPYz76RwcMC+mCKXILHSba TvauoE6kFEcxlwVobEDXg== X-UI-Out-Filterresults: notjunk:1; V01:K0:E0NHW0Z3GE4=:Hl8DJmXfY38lclx6ERw8CH 0ydkflFltZndKuaTjfVML9cpfGftn9m2Ni6JbkPL5C1iTx0glQ+DmwgdfXajsdXuseAaLGnYp m3Ky+LDvetCyza0Y3BKS+/YJQKYlkBBlxX6rdPgbJbTBmfMEjvbty2semEkszJ65pGxpoLjKx CVd857hMFfP6GxEZHrkYnwX0dPVY4JVzOsH+HBZfbT6GwFwJwBmdrv1id1GW2zznkMe4NKqP4 kiAT8JJTQa0U+a00D43ePIzdFG/NI+lxk16r/tYHbaTeUFwmv3hZGj1Rarf92Yy5lUF88FifE gjsObCEgfN8o6PRqfmjtNL70e2BeHwK612cf+bTqk1+CHMDWW6DOuH3waHXOPShsUpVdshi2j xhetxr8Jy2lTlIDPIIKsDO2WsC7DXTvEhXxhJuuwjDg0JWZY2TG8WyXdS/ECSs9nbgvLJMWB9 wJexV0KEumdtF1KdI8i/qo2vuZajPOhgcMVU7juEP3srIYOzs2lHRXiieYnG4la7gRE4bnEiZ 4cGsQ9Ypse/FWbal4Pq4ZL8sMVBgKlM8I9eFSaF86JifhfA6QsQbRAbD6l4qtF3G3DOwypUaa NlkGt6libP+2IvUjvqqic2upFOf4zylQp59mQzQ7SkzJUF5nc/bhWbqDgqUNQiqUiK92SZyuC /87Swk/EZb5H89eD2//AQNSYVBpX5Wv8+DpDv2TorPA4tPmETOBcaAzbNrOySGyGtUvI= Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org When compile-testing for something other than ARCH_QCOM, we run into a link error: drivers/gpu/drm/msm/adreno/a5xx_gpu.o: In function `a5xx_hw_init': a5xx_gpu.c:(.text.a5xx_hw_init+0x600): undefined reference to `qcom_mdt_get_size' a5xx_gpu.c:(.text.a5xx_hw_init+0x93c): undefined reference to `qcom_mdt_load' There is already an #ifdef that tries to check for CONFIG_QCOM_MDT_LOADER, but that symbol is only meaningful when building for ARCH_QCOM. This adds a compile-time check for ARCH_QCOM, and clarifies the Kconfig select statement so we don't even try it for other targets. The check for CONFIG_QCOM_MDT_LOADER can then go away, which also improves compile-time coverage and makes the code a little nicer to read. Fixes: 7c65817e6d38 ("drm/msm: gpu: Enable zap shader for A5XX") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/msm/Kconfig | 2 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index b638d192ce5e..99d39b2aefa6 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -5,7 +5,7 @@ config DRM_MSM depends on ARCH_QCOM || (ARM && COMPILE_TEST) depends on OF && COMMON_CLK depends on MMU - select QCOM_MDT_LOADER + select QCOM_MDT_LOADER if ARCH_QCOM select REGULATOR select DRM_KMS_HELPER select DRM_PANEL diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c index eee9ac81aaa1..b719a5b5b88a 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c @@ -26,8 +26,6 @@ static void a5xx_dump(struct msm_gpu *gpu); #define GPU_PAS_ID 13 -#if IS_ENABLED(CONFIG_QCOM_MDT_LOADER) - static int zap_shader_load_mdt(struct device *dev, const char *fwname) { const struct firmware *fw; @@ -36,6 +34,9 @@ static int zap_shader_load_mdt(struct device *dev, const char *fwname) void *mem_region = NULL; int ret; + if (!IS_ENABLED(CONFIG_ARCH_QCOM)) + return -EINVAL; + /* Request the MDT file for the firmware */ ret = request_firmware(&fw, fwname, dev); if (ret) { @@ -75,12 +76,6 @@ static int zap_shader_load_mdt(struct device *dev, const char *fwname) return ret; } -#else -static int zap_shader_load_mdt(struct device *dev, const char *fwname) -{ - return -ENODEV; -} -#endif static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit, struct msm_file_private *ctx)