From patchwork Wed Apr 8 19:14:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 185282 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp928164ilr; Wed, 8 Apr 2020 12:15:15 -0700 (PDT) X-Google-Smtp-Source: APiQypIfpu501Uk3Bh0lc1lUwbozhpiSRFUwYGSoajsC0XkI8CSTmyZQ/jelikdVVvhSVwv94JbL X-Received: by 2002:a17:90a:20f0:: with SMTP id f103mr6794973pjg.88.1586373315445; Wed, 08 Apr 2020 12:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586373315; cv=none; d=google.com; s=arc-20160816; b=G4+mzxiWkfUq+xvU++ERBsDunJKn/8T4kNxQHGsrutaFbDSgc1oMDkHw5NoTz5cg9/ ISNEmvlNhMlWFBkIuXbkkk4Sno6W2bP0x3QziC7u1TfNQJBMocAU++J5jc/dxwy00TQx 3yRpNww09Wyk/l4gi37gHnYe0xo75i+KMit8dwSYSNT7jYO/2G/hOVgwcHa+QuoCsMYV n3fjq8fmj3ioGpQtxac7h5tdLGAthPmllqg1nko6wZ+qk3QHbq3J+8SVrQ/ie3KISLID 39N8owG60+fW8V55jXhmxzhe9YeTrpwnhNZ3sRauUy6Bk3XyuqAF0XywhX635F876yJq UQ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=/x0kMl4mcUhymEdBIOdW0EWkWj9Tu9/jVtYh3RxZN+c=; b=y7/CGLwdgURFkGsZg+wQ3Yu3yr3dAkComlp4X7VzsYTBu026doBfLjGecy8ap091r1 aKZmasyX9q9QIn2by49MfSMl4SsU0MgOJSLaWej0XzD2/isNcRcyW8snHvtSSGVkpERs s3brDslQ6p3nPl/h3V2+juHSM5Zg60aD+qiyIkjULbtd5en0Cy/DEhRbiqTn2U+L/ohz PbMWKm/ulmBdm0Bg3iMnUYF592SA+QuNiqSoxNk1lVVIbjGHX6dvv17cv/e/aEo9L7DY VNU6VOtdFFBRaubp2d2KlrccDZPjLObX2cCvSHsxP45Rlb2jWATC+hVEaKmSLlSHfXza SdMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id h189si5007013pge.305.2020.04.08.12.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 12:15:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) 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 EADEC6EAB9; Wed, 8 Apr 2020 19:15:13 +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 [212.227.17.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A50C6EABA for ; Wed, 8 Apr 2020 19:15:11 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MG9Xu-1jW9e42yUO-00GXX9; Wed, 08 Apr 2020 21:15:00 +0200 From: Arnd Bergmann To: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Jordan Crouse Subject: [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS Date: Wed, 8 Apr 2020 21:14:22 +0200 Message-Id: <20200408191458.1260397-1-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:fdpx1d/DLJfitrFpYrv8Gkkt6VAi33wDZasxO8tqJ48cXnNukcc VB/q8aFUWkBATecQB02IKtYojv/7l+Y0/mI+xOkGkohuj0ZY4xA6z2cp4m13/z+BJ0uyHvn yA6d6TySZK/ah969Kwpn8hB3N5sX/O/4aiSFnMFZXs2FeFCV0pXCA3Gg2HWS8es86yMdTJp UwUjR8Rc/Y7boiWmcahiA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:kF1greHftFI=:ivJ7OWNComZDWHcSPqHuVF fQMfSIdFDMDjxV7GJQtasTwesVIjnbxOV3ownNUKiWq7W4MmZ4/XEbw1+54eOK8dO2yRHdFAO NEVksE9tiSX25TanxKVRdD6CudBu/Y4jb5750M3LUoD2vwOvlf16CjXqNdWh2APT8ZuibJWvE o2tiuVNIucvkYERGk4fSWF6wsu7u1O6Po2lCq30E1NjRMTE5Dwa63rtXtiik5SX/Ukx9wqGHe gST/LpfRaMbauz6fxk4xCxEW/If7kUB50d1Ls3zpWQXZTPQckX2Jgk8zN0X9243OLFs7Gwaje GrRasgfxmZW9uqthJzj6odDkV/EWXn8e01lHb6iHK2+Rqm5xcBGZnGXpLf1lqjXOjcURmPIjt 7jxvVts3EpHJ3CmN7su87024TaZeiU/63E8KScvBXle7nRZW/gubk+dyYhx4L3D+lr/IXNqS5 ZUylcVDrWpAiW58UFyVbUl1q4o3BArcu1ZeKrgFNMAMg1BAyz63jlrXCUJOTOS/g3Mw+ebBMB QKPemHcn1TsdD5CXVQC+paAf2IfcdxBfzAgr7PDkF1qkeyFr4lESb3zWerIJhuX98S2V/IKOm 2pjVCNR+I9/mnFscvygahOdh3eFe2wPgL2vKAV7vY+HlKEkr3f9H3Pep+SOCXVcyM7vzvoRyh 1+PRFyl4gOalwGSgcG7klIUbrVX4krfAT9sfWE+3e4KJLoRuGA4wzROscPdwN9Y7Lm8UfJkic 33UsM8NfMjkjuZc9EMwc8xbAvdckusmkA6IKvS/oUimisy+sB0pAxBbYwuh121fspv3WeZ3qX KmQQTuYd2KN8PuaOJPPaDdfSswvNBaI3+baHmXL7eWV9VhnvUY= 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: Rob Clark , Arnd Bergmann , linux-arm-msm@vger.kernel.org, "Kristian H. Kristensen" , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , freedreno@lists.freedesktop.org, Allison Randal Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" I ran into a randconfig link error with debugfs disabled: arm-linux-gnueabi-ld: drivers/gpu/drm/msm/msm_gpu.o: in function `should_dump': msm_gpu.c:(.text+0x1cc): undefined reference to `rd_full' Change the helper to only look at this variable if debugfs is present. Fixes: e515af8d4a6f ("drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/msm/msm_gem.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.26.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Tested-by: Linus Walleij diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index 30584eaf8cc8..eb4aeaf291ea 100644 --- a/drivers/gpu/drm/msm/msm_gem.h +++ b/drivers/gpu/drm/msm/msm_gem.h @@ -167,7 +167,10 @@ static inline bool should_dump(struct msm_gem_submit *submit, int idx) { extern bool rd_full; - return rd_full || (submit->bos[idx].flags & MSM_SUBMIT_BO_DUMP); + if (IS_ENABLED(CONFIG_DEBUG_FS) && rd_full) + return true; + + return submit->bos[idx].flags & MSM_SUBMIT_BO_DUMP; } #endif /* __MSM_GEM_H__ */