* [PATCH v2] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
@ 2026-08-11 15:19 Daniel Baluta
2026-08-11 21:48 ` Dmitry Baryshkov
2026-08-11 22:36 ` Nathan Chancellor
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Baluta @ 2026-08-11 15:19 UTC (permalink / raw)
To: andersson, konradybcio
Cc: dmitry.baryshkov, linux-arm-msm, linux-kernel, imx, Daniel Baluta
DRM_MSM unconditionally selects QCOM_UBWC_CONFIG, which calls SMEM APIs,
causing a link error on non-Qcom platforms (e.g. SOC_IMX5):
arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x2c): undefined
reference to 'qcom_smem_is_available'
arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x4c): undefined
reference to 'qcom_smem_dram_get_hbb'
Relax the selection of QCOM_UBWC_CONFIG to ARCH_QCOM only and make QCOM_UBWC_CONFIG
depend on QCOM_SMEM make the requirement explicit.
Fixes: 1b445022d1d0 ("soc: qcom: ubwc: Get HBB from SMEM")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
Changes since v1:
- (addressed feedback from Dmitry) replace adding static inline stubs with preparing a better config
dependecies so that we use the qcom_smem symbols only on QCOM platforms.
- Link to v1: https://lore.kernel.org/imx/sy2ulk536ryakhy6fdnqr4asvzvufqk3dlo2awdrfomulyf4n4@qtp4qoazqmhj/T/#t
drivers/gpu/drm/msm/Kconfig | 2 +-
drivers/soc/qcom/Kconfig | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
index 09469d56513b0..ab3844521255e 100644
--- a/drivers/gpu/drm/msm/Kconfig
+++ b/drivers/gpu/drm/msm/Kconfig
@@ -22,7 +22,7 @@ config DRM_MSM
select TMPFS
select QCOM_SCM
select QCOM_PAS
- select QCOM_UBWC_CONFIG
+ select QCOM_UBWC_CONFIG if ARCH_QCOM
select WANT_DEV_COREDUMP
select SND_SOC_HDMI_CODEC if SND_SOC
select SYNC_FILE
diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index fd4d4ecd2df0f..e0629e9328c87 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -321,6 +321,7 @@ config QCOM_QMI_HELPERS
config QCOM_UBWC_CONFIG
tristate
+ depends on QCOM_SMEM
help
Most Qualcomm SoCs feature a number of Universal Bandwidth Compression
(UBWC) engines across various IP blocks, which need to be initialized
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
2026-08-11 15:19 [PATCH v2] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
@ 2026-08-11 21:48 ` Dmitry Baryshkov
2026-08-11 22:36 ` Nathan Chancellor
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2026-08-11 21:48 UTC (permalink / raw)
To: Daniel Baluta; +Cc: andersson, konradybcio, linux-arm-msm, linux-kernel, imx
On Tue, Aug 11, 2026 at 06:19:05PM +0300, Daniel Baluta wrote:
> DRM_MSM unconditionally selects QCOM_UBWC_CONFIG, which calls SMEM APIs,
> causing a link error on non-Qcom platforms (e.g. SOC_IMX5):
>
> arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x2c): undefined
> reference to 'qcom_smem_is_available'
> arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x4c): undefined
> reference to 'qcom_smem_dram_get_hbb'
>
> Relax the selection of QCOM_UBWC_CONFIG to ARCH_QCOM only and make QCOM_UBWC_CONFIG
> depend on QCOM_SMEM make the requirement explicit.
>
> Fixes: 1b445022d1d0 ("soc: qcom: ubwc: Get HBB from SMEM")
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> Changes since v1:
> - (addressed feedback from Dmitry) replace adding static inline stubs with preparing a better config
> dependecies so that we use the qcom_smem symbols only on QCOM platforms.
> - Link to v1: https://lore.kernel.org/imx/sy2ulk536ryakhy6fdnqr4asvzvufqk3dlo2awdrfomulyf4n4@qtp4qoazqmhj/T/#t
>
> drivers/gpu/drm/msm/Kconfig | 2 +-
> drivers/soc/qcom/Kconfig | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
2026-08-11 15:19 [PATCH v2] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
2026-08-11 21:48 ` Dmitry Baryshkov
@ 2026-08-11 22:36 ` Nathan Chancellor
1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2026-08-11 22:36 UTC (permalink / raw)
To: Daniel Baluta
Cc: andersson, konradybcio, dmitry.baryshkov, linux-arm-msm,
linux-kernel, imx
On Tue, Aug 11, 2026 at 06:19:05PM +0300, Daniel Baluta wrote:
> DRM_MSM unconditionally selects QCOM_UBWC_CONFIG, which calls SMEM APIs,
> causing a link error on non-Qcom platforms (e.g. SOC_IMX5):
>
> arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x2c): undefined
> reference to 'qcom_smem_is_available'
> arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x4c): undefined
> reference to 'qcom_smem_dram_get_hbb'
>
> Relax the selection of QCOM_UBWC_CONFIG to ARCH_QCOM only and make QCOM_UBWC_CONFIG
> depend on QCOM_SMEM make the requirement explicit.
>
> Fixes: 1b445022d1d0 ("soc: qcom: ubwc: Get HBB from SMEM")
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> Changes since v1:
> - (addressed feedback from Dmitry) replace adding static inline stubs with preparing a better config
> dependecies so that we use the qcom_smem symbols only on QCOM platforms.
> - Link to v1: https://lore.kernel.org/imx/sy2ulk536ryakhy6fdnqr4asvzvufqk3dlo2awdrfomulyf4n4@qtp4qoazqmhj/T/#t
>
> drivers/gpu/drm/msm/Kconfig | 2 +-
> drivers/soc/qcom/Kconfig | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
> index 09469d56513b0..ab3844521255e 100644
> --- a/drivers/gpu/drm/msm/Kconfig
> +++ b/drivers/gpu/drm/msm/Kconfig
> @@ -22,7 +22,7 @@ config DRM_MSM
> select TMPFS
> select QCOM_SCM
> select QCOM_PAS
> - select QCOM_UBWC_CONFIG
> + select QCOM_UBWC_CONFIG if ARCH_QCOM
> select WANT_DEV_COREDUMP
> select SND_SOC_HDMI_CODEC if SND_SOC
> select SYNC_FILE
> diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
> index fd4d4ecd2df0f..e0629e9328c87 100644
> --- a/drivers/soc/qcom/Kconfig
> +++ b/drivers/soc/qcom/Kconfig
> @@ -321,6 +321,7 @@ config QCOM_QMI_HELPERS
>
> config QCOM_UBWC_CONFIG
> tristate
> + depends on QCOM_SMEM
> help
> Most Qualcomm SoCs feature a number of Universal Bandwidth Compression
> (UBWC) engines across various IP blocks, which need to be initialized
> --
> 2.45.2
>
This does not fully fix the issue. ARCH_QCOM=y and QCOM_SMEM=n will
still trigger the issue because select does not respect dependencies:
$ echo CONFIG_QCOM_SMEM=n >kernel/configs/no_smem.config
$ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- mrproper defconfig no_smem.config all
WARNING: unmet direct dependencies detected for QCOM_UBWC_CONFIG
Depends on [n]: QCOM_SMEM [=n]
Selected by [m]:
- DRM_MSM [=m] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_QCOM [=y] || SOC_IMX5 [=y] || COMPILE_TEST [=n]) && COMMON_CLK [=y] && IOMMU_SUPPORT [=y] && OF [=y] && (QCOM_AOSS_QMP [=y] || QCOM_AOSS_QMP [=y]=n [=n]) && (QCOM_OCMEM [=m] || QCOM_OCMEM [=m]=n [=n]) && (QCOM_LLCC [=m] || QCOM_LLCC [=m]=n [=n]) && (QCOM_COMMAND_DB [=m] || QCOM_COMMAND_DB [=m]=n [=n]) && PM [=y] && ARCH_QCOM [=y]
ERROR: modpost: drivers/soc/qcom/ubwc_config.ko: symbol 'qcom_smem_is_available' undefined!
ERROR: modpost: drivers/soc/qcom/ubwc_config.ko: symbol 'qcom_smem_dram_get_hbb' undefined!
...
--
Cheers,
Nathan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-11 22:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 15:19 [PATCH v2] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
2026-08-11 21:48 ` Dmitry Baryshkov
2026-08-11 22:36 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox