mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
@ 2026-08-17 12:35 Daniel Baluta
  2026-08-17 12:35 ` [PATCH v6 1/4] drm/msm: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM Daniel Baluta
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Daniel Baluta @ 2026-08-17 12:35 UTC (permalink / raw)
  To: andersson, konradybcio
  Cc: dmitry.baryshkov, linux-arm-msm, linux-kernel, imx, nathan,
	Daniel Baluta

DRM_MSM and VIDEO_QCOM_IRIS select QCOM_UBWC_CONFIG, whose
ubwc_config.c calls QCOM_SMEM APIs unconditionally. On configs without
QCOM_SMEM this fails to link, e.g. on SOC_IMX5:

  arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x2c): undefined
      reference to 'qcom_smem_is_available'

Fix it by making the QCOM_SMEM requirement explicit in Kconfig.

Changes since v5:
 * added patch 4/4 to this series, which was initially sent as a
 standalone patch (addresses review from Nathan)
 * no other change to the series.
 * picked up all R-b and Acked-by tags.

Link to v5: https://lore.kernel.org/imx/20260814141724.1006382-1-daniel.baluta@nxp.com/T/#t

Daniel Baluta (4):
  drm/msm: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM
  media: iris: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM
  soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
  soc: qcom: ubwc: Fix missing include

 drivers/gpu/drm/msm/Kconfig              | 3 ++-
 drivers/media/platform/qcom/iris/Kconfig | 3 ++-
 drivers/soc/qcom/Kconfig                 | 1 +
 include/linux/soc/qcom/ubwc.h            | 1 +
 4 files changed, 6 insertions(+), 2 deletions(-)

-- 
2.45.2


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

* [PATCH v6 1/4] drm/msm: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM
  2026-08-17 12:35 [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
@ 2026-08-17 12:35 ` Daniel Baluta
  2026-08-17 12:35 ` [PATCH v6 2/4] media: iris: " Daniel Baluta
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Daniel Baluta @ 2026-08-17 12:35 UTC (permalink / raw)
  To: andersson, konradybcio
  Cc: dmitry.baryshkov, linux-arm-msm, linux-kernel, imx, nathan,
	Daniel Baluta, Konrad Dybcio

QCOM_UBWC_CONFIG is about to depend on QCOM_SMEM. Guard the DRM_MSM
select with 'if ARCH_QCOM && QCOM_SMEM', and add
'depends on QCOM_SMEM || QCOM_SMEM=n' so a built-in driver is never
selected against a missing or modular SMEM.

Fixes: 1b445022d1d0 ("soc: qcom: ubwc: Get HBB from SMEM")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 drivers/gpu/drm/msm/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
index 09469d56513b0..ed1c4775d1e92 100644
--- a/drivers/gpu/drm/msm/Kconfig
+++ b/drivers/gpu/drm/msm/Kconfig
@@ -11,6 +11,7 @@ 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_SMEM || QCOM_SMEM=n
 	depends on PM
 	select IOMMU_IO_PGTABLE
 	select QCOM_MDT_LOADER if ARCH_QCOM
@@ -22,7 +23,7 @@ config DRM_MSM
 	select TMPFS
 	select QCOM_SCM
 	select QCOM_PAS
-	select QCOM_UBWC_CONFIG
+	select QCOM_UBWC_CONFIG if ARCH_QCOM && QCOM_SMEM
 	select WANT_DEV_COREDUMP
 	select SND_SOC_HDMI_CODEC if SND_SOC
 	select SYNC_FILE
-- 
2.45.2


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

* [PATCH v6 2/4] media: iris: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM
  2026-08-17 12:35 [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
  2026-08-17 12:35 ` [PATCH v6 1/4] drm/msm: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM Daniel Baluta
@ 2026-08-17 12:35 ` Daniel Baluta
  2026-08-18  0:57   ` Dmitry Baryshkov
  2026-08-18  0:58   ` Dmitry Baryshkov
  2026-08-17 12:35 ` [PATCH v6 3/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 10+ messages in thread
From: Daniel Baluta @ 2026-08-17 12:35 UTC (permalink / raw)
  To: andersson, konradybcio
  Cc: dmitry.baryshkov, linux-arm-msm, linux-kernel, imx, nathan,
	Daniel Baluta, Konrad Dybcio

QCOM_UBWC_CONFIG is about to depend on QCOM_SMEM. Guard the
VIDEO_QCOM_IRIS select with 'if ARCH_QCOM && QCOM_SMEM', and add
'depends on QCOM_SMEM || QCOM_SMEM=n' so a built-in driver is never
selected against a missing or modular SMEM.

Fixes: c43207553867 ("media: iris: retrieve UBWC platform configuration")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 drivers/media/platform/qcom/iris/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/iris/Kconfig b/drivers/media/platform/qcom/iris/Kconfig
index 388c9bbc81365..0996213e71e7a 100644
--- a/drivers/media/platform/qcom/iris/Kconfig
+++ b/drivers/media/platform/qcom/iris/Kconfig
@@ -2,11 +2,12 @@ config VIDEO_QCOM_IRIS
 	tristate "Qualcomm iris V4L2 decoder driver"
 	depends on VIDEO_DEV
 	depends on ARCH_QCOM || COMPILE_TEST
+	depends on QCOM_SMEM || QCOM_SMEM=n
 	select V4L2_MEM2MEM_DEV
 	select QCOM_MDT_LOADER
 	select QCOM_SCM
 	select QCOM_PAS
-	select QCOM_UBWC_CONFIG
+	select QCOM_UBWC_CONFIG if ARCH_QCOM && QCOM_SMEM
 	select VIDEOBUF2_DMA_CONTIG
 	help
 	  This is a V4L2 driver for Qualcomm iris video accelerator
-- 
2.45.2


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

* [PATCH v6 3/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
  2026-08-17 12:35 [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
  2026-08-17 12:35 ` [PATCH v6 1/4] drm/msm: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM Daniel Baluta
  2026-08-17 12:35 ` [PATCH v6 2/4] media: iris: " Daniel Baluta
@ 2026-08-17 12:35 ` Daniel Baluta
  2026-08-18  1:02   ` Dmitry Baryshkov
  2026-08-17 12:35 ` [PATCH v6 4/4] soc: qcom: ubwc: Fix missing include Daniel Baluta
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Daniel Baluta @ 2026-08-17 12:35 UTC (permalink / raw)
  To: andersson, konradybcio
  Cc: dmitry.baryshkov, linux-arm-msm, linux-kernel, imx, nathan,
	Daniel Baluta, Konrad Dybcio

ubwc_config.c calls qcom_smem_is_available() and qcom_smem_dram_get_hbb()
unconditionally, so QCOM_UBWC_CONFIG=y with QCOM_SMEM=n fails to link:

  arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x2c): undefined
      reference to 'qcom_smem_is_available'

Add the missing 'depends on QCOM_SMEM'.

Fixes: 1b445022d1d0 ("soc: qcom: ubwc: Get HBB from SMEM")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 drivers/soc/qcom/Kconfig | 1 +
 1 file changed, 1 insertion(+)

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	[flat|nested] 10+ messages in thread

* [PATCH v6 4/4] soc: qcom: ubwc: Fix missing include
  2026-08-17 12:35 [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
                   ` (2 preceding siblings ...)
  2026-08-17 12:35 ` [PATCH v6 3/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
@ 2026-08-17 12:35 ` Daniel Baluta
  2026-08-17 18:17 ` [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Nathan Chancellor
  2026-08-18  9:47 ` Arnd Bergmann
  5 siblings, 0 replies; 10+ messages in thread
From: Daniel Baluta @ 2026-08-17 12:35 UTC (permalink / raw)
  To: andersson, konradybcio
  Cc: dmitry.baryshkov, linux-arm-msm, linux-kernel, imx, nathan,
	Daniel Baluta, Konrad Dybcio

When CONFIG_QCOM_UBWC_CONFIG=n, compiler needs to know the definition
of ERR_PTR otherwise there will be a compilation error:

In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp_v13.c:7:
./include/linux/soc/qcom/ubwc.h: In function ‘qcom_ubwc_config_get_data’:
./include/linux/soc/qcom/ubwc.h:45:16: error: implicit declaration of
function ‘ERR_PTR’ [-Wimplicit-function-declaration]

Fix this by including <linux/err.h>

Fixes: 1924272b9ce1 ("soc: qcom: Add UBWC config provider")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 include/linux/soc/qcom/ubwc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
index a7372d9c25fbc..f3a70360b177b 100644
--- a/include/linux/soc/qcom/ubwc.h
+++ b/include/linux/soc/qcom/ubwc.h
@@ -8,6 +8,7 @@
 #define __QCOM_UBWC_H__
 
 #include <linux/bits.h>
+#include <linux/err.h>
 #include <linux/printk.h>
 #include <linux/types.h>
 
-- 
2.45.2


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

* Re: [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
  2026-08-17 12:35 [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
                   ` (3 preceding siblings ...)
  2026-08-17 12:35 ` [PATCH v6 4/4] soc: qcom: ubwc: Fix missing include Daniel Baluta
@ 2026-08-17 18:17 ` Nathan Chancellor
  2026-08-18  9:47 ` Arnd Bergmann
  5 siblings, 0 replies; 10+ messages in thread
From: Nathan Chancellor @ 2026-08-17 18:17 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: andersson, konradybcio, dmitry.baryshkov, linux-arm-msm,
	linux-kernel, imx

Hi Daniel,

On Mon, Aug 17, 2026 at 03:35:37PM +0300, Daniel Baluta wrote:
> DRM_MSM and VIDEO_QCOM_IRIS select QCOM_UBWC_CONFIG, whose
> ubwc_config.c calls QCOM_SMEM APIs unconditionally. On configs without
> QCOM_SMEM this fails to link, e.g. on SOC_IMX5:
> 
>   arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x2c): undefined
>       reference to 'qcom_smem_is_available'
> 
> Fix it by making the QCOM_SMEM requirement explicit in Kconfig.
> 
> Changes since v5:
>  * added patch 4/4 to this series, which was initially sent as a
>  standalone patch (addresses review from Nathan)
>  * no other change to the series.
>  * picked up all R-b and Acked-by tags.
> 
> Link to v5: https://lore.kernel.org/imx/20260814141724.1006382-1-daniel.baluta@nxp.com/T/#t
> 
> Daniel Baluta (4):
>   drm/msm: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM
>   media: iris: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM
>   soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
>   soc: qcom: ubwc: Fix missing include
> 
>  drivers/gpu/drm/msm/Kconfig              | 3 ++-
>  drivers/media/platform/qcom/iris/Kconfig | 3 ++-
>  drivers/soc/qcom/Kconfig                 | 1 +
>  include/linux/soc/qcom/ubwc.h            | 1 +
>  4 files changed, 6 insertions(+), 2 deletions(-)

Thanks, this resolves the build errors that I noticed.

Tested-by: Nathan Chancellor <nathan@kernel.org> # build

-- 
Cheers,
Nathan

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

* Re: [PATCH v6 2/4] media: iris: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM
  2026-08-17 12:35 ` [PATCH v6 2/4] media: iris: " Daniel Baluta
@ 2026-08-18  0:57   ` Dmitry Baryshkov
  2026-08-18  0:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-08-18  0:57 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: andersson, konradybcio, linux-arm-msm, linux-kernel, imx, nathan,
	Konrad Dybcio

On Mon, Aug 17, 2026 at 03:35:39PM +0300, Daniel Baluta wrote:
> QCOM_UBWC_CONFIG is about to depend on QCOM_SMEM. Guard the
> VIDEO_QCOM_IRIS select with 'if ARCH_QCOM && QCOM_SMEM', and add
> 'depends on QCOM_SMEM || QCOM_SMEM=n' so a built-in driver is never
> selected against a missing or modular SMEM.
> 
> Fixes: c43207553867 ("media: iris: retrieve UBWC platform configuration")
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
>  drivers/media/platform/qcom/iris/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v6 2/4] media: iris: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM
  2026-08-17 12:35 ` [PATCH v6 2/4] media: iris: " Daniel Baluta
  2026-08-18  0:57   ` Dmitry Baryshkov
@ 2026-08-18  0:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-08-18  0:58 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: andersson, konradybcio, linux-arm-msm, linux-kernel, imx, nathan,
	Konrad Dybcio

On Mon, Aug 17, 2026 at 03:35:39PM +0300, Daniel Baluta wrote:
> QCOM_UBWC_CONFIG is about to depend on QCOM_SMEM. Guard the
> VIDEO_QCOM_IRIS select with 'if ARCH_QCOM && QCOM_SMEM', and add
> 'depends on QCOM_SMEM || QCOM_SMEM=n' so a built-in driver is never
> selected against a missing or modular SMEM.
> 
> Fixes: c43207553867 ("media: iris: retrieve UBWC platform configuration")
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
>  drivers/media/platform/qcom/iris/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH v6 3/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
  2026-08-17 12:35 ` [PATCH v6 3/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
@ 2026-08-18  1:02   ` Dmitry Baryshkov
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-08-18  1:02 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: andersson, konradybcio, linux-arm-msm, linux-kernel, imx, nathan,
	Konrad Dybcio

On Mon, Aug 17, 2026 at 03:35:40PM +0300, Daniel Baluta wrote:
> ubwc_config.c calls qcom_smem_is_available() and qcom_smem_dram_get_hbb()
> unconditionally, so QCOM_UBWC_CONFIG=y with QCOM_SMEM=n fails to link:
> 
>   arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x2c): undefined
>       reference to 'qcom_smem_is_available'
> 
> Add the missing 'depends on QCOM_SMEM'.
> 
> Fixes: 1b445022d1d0 ("soc: qcom: ubwc: Get HBB from SMEM")
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
>  drivers/soc/qcom/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
  2026-08-17 12:35 [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
                   ` (4 preceding siblings ...)
  2026-08-17 18:17 ` [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Nathan Chancellor
@ 2026-08-18  9:47 ` Arnd Bergmann
  5 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2026-08-18  9:47 UTC (permalink / raw)
  To: Daniel Baluta, Bjorn Andersson, Konrad Dybcio
  Cc: Dmitry Baryshkov, linux-arm-msm, linux-kernel, imx,
	Nathan Chancellor, Krzysztof Kozlowski

On Mon, Aug 17, 2026, at 14:35, Daniel Baluta wrote:
> DRM_MSM and VIDEO_QCOM_IRIS select QCOM_UBWC_CONFIG, whose
> ubwc_config.c calls QCOM_SMEM APIs unconditionally. On configs without
> QCOM_SMEM this fails to link, e.g. on SOC_IMX5:
>
>   arm-linux-gnueabihf-ld: ubwc_config.c:(.text+0x2c): undefined
>       reference to 'qcom_smem_is_available'
>
> Fix it by making the QCOM_SMEM requirement explicit in Kconfig.
>
> Changes since v5:
>  * added patch 4/4 to this series, which was initially sent as a
>  standalone patch (addresses review from Nathan)
>  * no other change to the series.
>  * picked up all R-b and Acked-by tags.
>
> Link to v5: 
> https://lore.kernel.org/imx/20260814141724.1006382-1-daniel.baluta@nxp.com/T/#t

Krzysztof pointed me to this series when I ran into the same problem
during my last minute regression test for the coming merge window.

I've included the four patches as fixups in the soc/drivers branch
now and plan to send this to Linus later today when the regression tests
finish.

Let me know if anyone feels that the patches should go a different way.

    Arnd

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

end of thread, other threads:[~2026-08-18  9:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-17 12:35 [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
2026-08-17 12:35 ` [PATCH v6 1/4] drm/msm: Guard the QCOM_UBWC_CONFIG select with QCOM_SMEM Daniel Baluta
2026-08-17 12:35 ` [PATCH v6 2/4] media: iris: " Daniel Baluta
2026-08-18  0:57   ` Dmitry Baryshkov
2026-08-18  0:58   ` Dmitry Baryshkov
2026-08-17 12:35 ` [PATCH v6 3/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
2026-08-18  1:02   ` Dmitry Baryshkov
2026-08-17 12:35 ` [PATCH v6 4/4] soc: qcom: ubwc: Fix missing include Daniel Baluta
2026-08-17 18:17 ` [PATCH v6 0/4] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Nathan Chancellor
2026-08-18  9:47 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®