Skip to contentSkip to conversation

media: ipu-bridge: fix ipu6 Kconfig dependencies

PATCH In review Arnd Bergmann 3 participants 4 messages Jul 19, 2024 – Jul 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: ipu-bridge: fix ipu6 Kconfig dependencies

From: Arnd Bergmann <[email protected]>

Commit 4670c8c3fb04 ("media: ipu-bridge: Fix Kconfig dependencies") changed how IPU_BRIDGE dependencies are handled for all drivers, but the IPU6 variant was added the old way, which causes build time warnings when I2C is turned off:

WARNING: unmet direct dependencies detected for IPU_BRIDGE
Depends on [n]: MEDIA_SUPPORT [=m] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && (ACPI [=y] || COMPILE_TEST [=y]) && I2C [=n]
Selected by [m]:
- VIDEO_INTEL_IPU6 [=m] && MEDIA_SUPPORT [=m] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && (ACPI [=y] || COMPILE_TEST [=y]) && VIDEO_DEV [=m] && X86 [=y] && X86_64 [=y] && HAS_DMA [=y]

To make it consistent with the other IPU drivers as well as avoid this warning, change the 'select' into 'depends on'.

Fixes c70281cc83d6 ("media: intel/ipu6: add Kconfig and Makefile")
---
 drivers/media/pci/intel/ipu6/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/intel/ipu6/Kconfig +1 -1
index 154343080c82..ffadf03478a8 100644
@@ -3,13 +3,13 @@ config VIDEO_INTEL_IPU6
 	depends on ACPI || COMPILE_TEST
 	depends on VIDEO_DEV
 	depends on X86 && X86_64 && HAS_DMA
+	depends on IPU_BRIDGE
 	select DMA_OPS
 	select IOMMU_IOVA
 	select VIDEO_V4L2_SUBDEV_API
 	select MEDIA_CONTROLLER
 	select VIDEOBUF2_DMA_CONTIG
 	select V4L2_FWNODE
-	select IPU_BRIDGE
 	help
 	  This is the 6th Gen Intel Image Processing Unit, found in Intel SoCs
 	  and used for capturing images and video from camera sensors.
Signature · 1 line
2.39.2
maintainer
#1 lore raw

Hi Arnd,

Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Commit 4670c8c3fb04 ("media: ipu-bridge: Fix Kconfig dependencies") changed how IPU_BRIDGE dependencies are handled for all drivers, but the IPU6 variant was added the old way, which causes build time warnings when I2C is turned off:

Quoted 7 lines

WARNING: unmet direct dependencies detected for IPU_BRIDGE
Depends on [n]: MEDIA_SUPPORT [=m] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && (ACPI [=y] || COMPILE_TEST [=y]) && I2C [=n]
Selected by [m]:
- VIDEO_INTEL_IPU6 [=m] && MEDIA_SUPPORT [=m] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && (ACPI [=y] || COMPILE_TEST [=y]) && VIDEO_DEV [=m] && X86 [=y] && X86_64 [=y] && HAS_DMA [=y]

To make it consistent with the other IPU drivers as well as avoid this warning, change the 'select' into 'depends on'.

Thanks for the patch. I'm not sure how I managed to miss the IPU6 driver...

I think we also need, besides IPU_BRIDGE, || !IPU_BRIDGE, as the IPU_BRIDGE has additional dependencies (I2C) compared to VIDEO_INTEL_IPU6. I'll add that while applying. Please let me know if you have concerns.

Quoted 26 lines
Fixes c70281cc83d6 ("media: intel/ipu6: add Kconfig and Makefile")
---
 drivers/media/pci/intel/ipu6/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/intel/ipu6/Kconfig +1 -1
index 154343080c82..ffadf03478a8 100644
@@ -3,13 +3,13 @@ config VIDEO_INTEL_IPU6
 	depends on ACPI || COMPILE_TEST
 	depends on VIDEO_DEV
 	depends on X86 && X86_64 && HAS_DMA
+	depends on IPU_BRIDGE
 	select DMA_OPS
 	select IOMMU_IOVA
 	select VIDEO_V4L2_SUBDEV_API
 	select MEDIA_CONTROLLER
 	select VIDEOBUF2_DMA_CONTIG
 	select V4L2_FWNODE
-	select IPU_BRIDGE
 	help
 	  This is the 6th Gen Intel Image Processing Unit, found in Intel SoCs
 	  and used for capturing images and video from camera sensors.
Signature · 3 lines
Kind regards,

Sakari Ailus
#2 lore raw
Quoted 4 lines · Sakari Ailus
Quoted 2 lines

To make it consistent with the other IPU drivers as well as avoid this warning, change the 'select' into 'depends on'.

Thanks for the patch. I'm not sure how I managed to miss the IPU6 driver...

The driver was only adding in 6.10, so your patch was correct at the time.

Quoted 3 lines

I think we also need, besides IPU_BRIDGE, || !IPU_BRIDGE, as the IPU_BRIDGE has additional dependencies (I2C) compared to VIDEO_INTEL_IPU6. I'll add that while applying. Please let me know if you have concerns.

Makes sense, yes. I went with a hard dependency since that stays close to the current version with the select. I tried build-testing IPU6 now with IPU_BRIDGE=n and I2C=n/I2C=m, which works fine.

However, the testing showed that IPU6 also missed a 'select AUXILIARY_BUS', which I had not found in randconfig testing because that usually gets selected by one of is other 30 users.

Since you are changing my patch already, maybe you can also add that at the same time. Thanks,

Arnd

maintainer
#3 lore raw

Hi Arnd,

Quoted 17 lines · Arnd Bergmann
Quoted 4 lines · Sakari Ailus
Quoted 2 lines

To make it consistent with the other IPU drivers as well as avoid this warning, change the 'select' into 'depends on'.

Thanks for the patch. I'm not sure how I managed to miss the IPU6 driver...

The driver was only adding in 6.10, so your patch was correct at the time.

Quoted 3 lines

I think we also need, besides IPU_BRIDGE, || !IPU_BRIDGE, as the IPU_BRIDGE has additional dependencies (I2C) compared to VIDEO_INTEL_IPU6. I'll add that while applying. Please let me know if you have concerns.

Makes sense, yes. I went with a hard dependency since that stays close to the current version with the select. I tried build-testing IPU6 now with IPU_BRIDGE=n and I2C=n/I2C=m, which works fine.

Quoted 6 lines

However, the testing showed that IPU6 also missed a 'select AUXILIARY_BUS', which I had not found in randconfig testing because that usually gets selected by one of is other 30 users.

Since you are changing my patch already, maybe you can also add that at the same time. Thanks,

Well, yes. I got an lkp test report on this and wrote a patch to address
it:
<URL:https://lore.kernel.org/linux-media/[email protected]/T/#u>.

I'll send a PR on the two in a few hours if there are no further issues, hoping to get it to rc2.

Signature · 3 lines
Kind regards,

Sakari Ailus