linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm/gpu: fix link failure with QCOM_SCM=m
@ 2021-08-02 14:53 Arnd Bergmann
  2021-08-04  7:43 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-08-02 14:53 UTC (permalink / raw)
  To: Rob Clark, Sean Paul
  Cc: John Stultz, Arnd Bergmann, David Airlie, Daniel Vetter,
	Tanmay Shah, Abhinav Kumar, Chandan Uddaraju, Georgi Djakov,
	Dmitry Baryshkov, Jonathan Marek, Jordan Crouse, Kees Cook,
	Sai Prakash Ranjan, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Another missed dependency when SCM is a loadable module
and adreno is built-in:

drivers/gpu/drm/msm/adreno/adreno_gpu.o: In function `adreno_zap_shader_load':
adreno_gpu.c:(.text+0x1e8): undefined reference to `qcom_scm_is_available'
drivers/gpu/drm/msm/adreno/a5xx_gpu.o: In function `a5xx_hw_init':
a5xx_gpu.c:(.text+0x28a6): undefined reference to `qcom_scm_set_remote_state'

Change it so the dependency on QCOM_SCM and QCOM_MDT_LOADER can be
ignored if we are not building for ARCH_QCOM, but prevent the
link error during compile testing when SCM is a loadable module
and ARCH_QCOM is disabled.

Fixes: a9e2559c931d ("drm/msm/gpu: Move zap shader loading to adreno")
Fixes: 5ea4dba68305 ("drm/msm/a6xx: add CONFIG_QCOM_LLCC dependency")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/msm/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
index 52536e7adb95..69fbfe4568b2 100644
--- a/drivers/gpu/drm/msm/Kconfig
+++ b/drivers/gpu/drm/msm/Kconfig
@@ -9,14 +9,14 @@ config DRM_MSM
 	depends on QCOM_OCMEM || QCOM_OCMEM=n
 	depends on QCOM_LLCC || QCOM_LLCC=n
 	depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
+	depends on QCOM_SCM || (QCOM_SCM=n && ARCH_QCOM=n)
+	depends on QCOM_MDT_LOADER || ARCH_QCOM=n
 	select IOMMU_IO_PGTABLE
-	select QCOM_MDT_LOADER if ARCH_QCOM
 	select REGULATOR
 	select DRM_KMS_HELPER
 	select DRM_PANEL
 	select SHMEM
 	select TMPFS
-	select QCOM_SCM if ARCH_QCOM
 	select WANT_DEV_COREDUMP
 	select SND_SOC_HDMI_CODEC if SND_SOC
 	select SYNC_FILE
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/msm/gpu: fix link failure with QCOM_SCM=m
  2021-08-02 14:53 [PATCH] drm/msm/gpu: fix link failure with QCOM_SCM=m Arnd Bergmann
@ 2021-08-04  7:43 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2021-08-04  7:43 UTC (permalink / raw)
  To: Rob Clark, Sean Paul
  Cc: John Stultz, Arnd Bergmann, David Airlie, Daniel Vetter,
	Tanmay Shah, Abhinav Kumar, Chandan Uddaraju, Georgi Djakov,
	Dmitry Baryshkov, Jonathan Marek, Jordan Crouse, Kees Cook,
	Sai Prakash Ranjan, linux-arm-msm, dri-devel, freedreno,
	Linux Kernel Mailing List

On Mon, Aug 2, 2021 at 4:53 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> Another missed dependency when SCM is a loadable module
> and adreno is built-in:
>
> drivers/gpu/drm/msm/adreno/adreno_gpu.o: In function `adreno_zap_shader_load':
> adreno_gpu.c:(.text+0x1e8): undefined reference to `qcom_scm_is_available'
> drivers/gpu/drm/msm/adreno/a5xx_gpu.o: In function `a5xx_hw_init':
> a5xx_gpu.c:(.text+0x28a6): undefined reference to `qcom_scm_set_remote_state'
>
> Change it so the dependency on QCOM_SCM and QCOM_MDT_LOADER can be
> ignored if we are not building for ARCH_QCOM, but prevent the
> link error during compile testing when SCM is a loadable module
> and ARCH_QCOM is disabled.
>
> Fixes: a9e2559c931d ("drm/msm/gpu: Move zap shader loading to adreno")
> Fixes: 5ea4dba68305 ("drm/msm/a6xx: add CONFIG_QCOM_LLCC dependency")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Oh, this is still wrong, for two reasons:

> ---
>  drivers/gpu/drm/msm/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
> index 52536e7adb95..69fbfe4568b2 100644
> --- a/drivers/gpu/drm/msm/Kconfig
> +++ b/drivers/gpu/drm/msm/Kconfig
> @@ -9,14 +9,14 @@ config DRM_MSM
>         depends on QCOM_OCMEM || QCOM_OCMEM=n
>         depends on QCOM_LLCC || QCOM_LLCC=n
>         depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
> +       depends on QCOM_SCM || (QCOM_SCM=n && ARCH_QCOM=n)
> +       depends on QCOM_MDT_LOADER || ARCH_QCOM=n

* Only QCOM_SCM has become user-selectable, but QCOM_MDT_LOADER
   is still meant to only be selected by its users, so we cannot depend on it
   here

* There are two other drivers that have the broken 'select QCOM_SCM if
   ARCH_QCOM', we have to fix them all at once.

         Arnd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-04  7:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 14:53 [PATCH] drm/msm/gpu: fix link failure with QCOM_SCM=m Arnd Bergmann
2021-08-04  7:43 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).