[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200408191458.1260397-1-arnd@arndb.de>
Date: Wed, 8 Apr 2020 21:14:22 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Jordan Crouse <jcrouse@...eaurora.org>
Cc: Arnd Bergmann <arnd@...db.de>, Rob Clark <robdclark@...omium.org>,
"Kristian H. Kristensen" <hoegsberg@...il.com>,
Allison Randal <allison@...utok.net>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drm/msm: fix link error without CONFIG_DEBUG_FS
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 <arnd@...db.de>
---
drivers/gpu/drm/msm/msm_gem.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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__ */
--
2.26.0
Powered by blists - more mailing lists