From: Jordan Crouse <jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Archit Taneja <architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
Daniel Vetter <daniel.vetter-/w4YWyX8dFk@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Bjorn Andersson
<bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Sushmita Susheelendra
<ssusheel-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>,
Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Srinivas Kandagatla
<srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 2/2] drm/msm: gpu: call qcom_mdt interfaces only for ARCH_QCOM
Date: Wed, 21 Jun 2017 08:58:55 -0600 [thread overview]
Message-ID: <20170621145855.GB7607@jcrouse-lnx.qualcomm.com> (raw)
In-Reply-To: <20170620201720.225593-2-arnd-r2nGTMty4D4@public.gmane.org>
On Tue, Jun 20, 2017 at 10:16:51PM +0200, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
(ARM && COMPILE_TEST) really gives the dependency checks a run for their money.
I assume Bjorn is cool with this.
Acked-by: Jordan Crouse <jcrouse@codeaurora.org>
> ---
> drivers/gpu/drm/msm/Kconfig | 2 +-
> drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 11 +++--------
> 2 files changed, 4 insertions(+), 9 deletions(-)
>
> 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)
> --
> 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
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
next prev parent reply other threads:[~2017-06-21 14:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 20:16 [PATCH 1/2] drm/msm: gpu: don't abuse dma_alloc for non-DMA allocations Arnd Bergmann
2017-06-20 20:16 ` [PATCH 2/2] drm/msm: gpu: call qcom_mdt interfaces only for ARCH_QCOM Arnd Bergmann
[not found] ` <20170620201720.225593-2-arnd-r2nGTMty4D4@public.gmane.org>
2017-06-21 14:58 ` Jordan Crouse [this message]
2017-06-29 5:11 ` Bjorn Andersson
2017-06-21 14:53 ` [PATCH 1/2] drm/msm: gpu: don't abuse dma_alloc for non-DMA allocations Jordan Crouse
[not found] ` <20170620201720.225593-1-arnd-r2nGTMty4D4@public.gmane.org>
2017-06-29 5:06 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170621145855.GB7607@jcrouse-lnx.qualcomm.com \
--to=jcrouse-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=daniel.vetter-/w4YWyX8dFk@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org \
--cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ssusheel-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox