Skip to contentSkip to conversation

drm/bridge/sii8620: fix dependency on extcon

PATCH Superseded Robert Foss 2 participants 3 messages Apr 8, 2021 – Apr 13, 2021

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/bridge/sii8620: fix dependency on extcon

The DRM_SIL_SII8620 kconfig has a weak imply dependency on EXTCON, which causes issues when sii8620 is built as a builtin and EXTCON is built as a module.

The symptoms are 'undefined reference' errors caused by the symbols in EXTCON not being available to the sii8620 driver.

---

Changes since v1:
- Fix typo on comment

 drivers/gpu/drm/bridge/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/Kconfig +1 -1
index 22a467abd3e9..2289b44613af 100644
@@ -169,7 +169,7 @@ config DRM_SIL_SII8620
 	tristate "Silicon Image SII8620 HDMI/MHL bridge"
 	depends on OF
 	select DRM_KMS_HELPER
-	imply EXTCON
+	depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in
 	depends on RC_CORE || !RC_CORE
 	help
 	  Silicon Image SII8620 HDMI/MHL bridge chip driver.
Signature · 6 lines
2.31.0.30.g398dba342d.dirty

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 24 lines · Robert Foss

The DRM_SIL_SII8620 kconfig has a weak imply dependency on EXTCON, which causes issues when sii8620 is built as a builtin and EXTCON is built as a module.

The symptoms are 'undefined reference' errors caused by the symbols in EXTCON not being available to the sii8620 driver.

---

Changes since v1:
- Fix typo on comment

 drivers/gpu/drm/bridge/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/Kconfig +0 -0
index 22a467abd3e9..2289b44613af 100644

drivers/gpu/drm/bridge/Kconfig config DRM_SIL_SII8620 · line 175

Quoted 8 lines
drivers/gpu/drm/bridge/Kconfig +1 -1
@@ -169,7 +169,7 @@ config DRM_SIL_SII8620
 	tristate "Silicon Image SII8620 HDMI/MHL bridge"
 	depends on OF
 	select DRM_KMS_HELPER
-	imply EXTCON
+	depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in
 	depends on RC_CORE || !RC_CORE
 	help
 	  Silicon Image SII8620 HDMI/MHL bridge chip driver.

That gives me: (on linux-next 20210409)

drivers/gpu/drm/Kconfig:77:error: recursive dependency detected!
drivers/gpu/drm/Kconfig:77: symbol DRM_KMS_HELPER is selected by DRM_SIL_SII8620
drivers/gpu/drm/bridge/Kconfig:168: symbol DRM_SIL_SII8620 depends on EXTCON
drivers/extcon/Kconfig:2: symbol EXTCON is selected by CHARGER_MANAGER
drivers/power/supply/Kconfig:499: symbol CHARGER_MANAGER depends on POWER_SUPPLY
drivers/power/supply/Kconfig:2: symbol POWER_SUPPLY is selected by OLPC_XO1_SCI
arch/x86/Kconfig:2757: symbol OLPC_XO1_SCI depends on GPIO_CS5535
drivers/gpio/Kconfig:1156: symbol GPIO_CS5535 depends on GPIOLIB
drivers/gpio/Kconfig:14: symbol GPIOLIB is selected by I2C_MUX_LTC4306
drivers/i2c/muxes/Kconfig:47: symbol I2C_MUX_LTC4306 depends on I2C
drivers/i2c/Kconfig:8: symbol I2C is selected by FB_DDC
drivers/video/fbdev/Kconfig:63: symbol FB_DDC depends on FB
drivers/video/fbdev/Kconfig:12: symbol FB is selected by DRM_KMS_FB_HELPER
drivers/gpu/drm/Kconfig:83: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER
For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations"

Signature · 6 lines
~Randy

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

Hey Randy,

Thanks for looking at this!

Quoted 47 lines · Randy Dunlap
Quoted 24 lines · Robert Foss

The DRM_SIL_SII8620 kconfig has a weak imply dependency on EXTCON, which causes issues when sii8620 is built as a builtin and EXTCON is built as a module.

The symptoms are 'undefined reference' errors caused by the symbols in EXTCON not being available to the sii8620 driver.

---

Changes since v1:
- Fix typo on comment

 drivers/gpu/drm/bridge/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/Kconfig +0 -0
index 22a467abd3e9..2289b44613af 100644

drivers/gpu/drm/bridge/Kconfig config DRM_SIL_SII8620 · line 175

Quoted 8 lines
drivers/gpu/drm/bridge/Kconfig +1 -1
@@ -169,7 +169,7 @@ config DRM_SIL_SII8620
      tristate "Silicon Image SII8620 HDMI/MHL bridge"
      depends on OF
      select DRM_KMS_HELPER
-     imply EXTCON
+     depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in
      depends on RC_CORE || !RC_CORE
      help
        Silicon Image SII8620 HDMI/MHL bridge chip driver.

That gives me: (on linux-next 20210409)

drivers/gpu/drm/Kconfig:77:error: recursive dependency detected!
drivers/gpu/drm/Kconfig:77: symbol DRM_KMS_HELPER is selected by DRM_SIL_SII8620
drivers/gpu/drm/bridge/Kconfig:168: symbol DRM_SIL_SII8620 depends on EXTCON
drivers/extcon/Kconfig:2: symbol EXTCON is selected by CHARGER_MANAGER
drivers/power/supply/Kconfig:499: symbol CHARGER_MANAGER depends on POWER_SUPPLY
drivers/power/supply/Kconfig:2: symbol POWER_SUPPLY is selected by OLPC_XO1_SCI arch/x86/Kconfig:2757: symbol OLPC_XO1_SCI depends on GPIO_CS5535

drivers/gpio/Kconfig:1156:      symbol GPIO_CS5535 depends on GPIOLIB
drivers/gpio/Kconfig:14:        symbol GPIOLIB is selected by I2C_MUX_LTC4306
drivers/i2c/muxes/Kconfig:47:   symbol I2C_MUX_LTC4306 depends on I2C
Quoted 6 lines

drivers/i2c/Kconfig:8: symbol I2C is selected by FB_DDC drivers/video/fbdev/Kconfig:63: symbol FB_DDC depends on FB drivers/video/fbdev/Kconfig:12: symbol FB is selected by DRM_KMS_FB_HELPER
drivers/gpu/drm/Kconfig:83: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER
For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations"

I'm not sure how to avoid this circular dependency. The above solution is what I've seen w/r to issues like [1]. Clearly it doesn't work in this situation. select EXTCON doesn't seem to cause this dependency error, but I'm not sure it accurately represents the dependency sii8620 has on extcon.

[1] https://lore.kernel.org/lkml/[email protected]/
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel