Skip to contentSkip to conversation

drm: bridge: for GENERIC_PHY_MIPI_DPHY also select GENERIC_PHY

PATCH Applied Randy Dunlap 5 participants 5 messages Aug 4, 2023 – Aug 11, 2023

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

PATCH 1/1 drm: bridge: for GENERIC_PHY_MIPI_DPHY also select GENERIC_PHY

Three DRM bridge drivers select GENERIC_PHY_MIPI_DPHY when GENERIC_PHY might not be set. This causes Kconfig warnings and a build error.

WARNING: unmet direct dependencies detected for GENERIC_PHY_MIPI_DPHY
Depends on [n]: GENERIC_PHY [=n]
Selected by [y]:
- DRM_NWL_MIPI_DSI [=y] && DRM_BRIDGE [=y] && DRM [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]
- DRM_SAMSUNG_DSIM [=y] && DRM [=y] && DRM_BRIDGE [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]

(drm/bridge/cadence/Kconfig was found by inspection.)

aarch64-linux-ld: drivers/gpu/drm/bridge/samsung-dsim.o: in function `samsung_dsim_set_phy_ctrl':
drivers/gpu/drm/bridge/samsung-dsim.c:731: undefined reference to `phy_mipi_dphy_get_default_config_for_hsclk'

Prevent these warnings and build error by also selecting GENERIC_PHY whenever selecting GENERIC_PHY_MIPI_DPHY.

Fixes fced5a364dee ("drm/bridge: cdns: Convert to phy framework")
Fixes 44cfc6233447 ("drm/bridge: Add NWL MIPI DSI host controller support")
Fixes 171b3b1e0f8b ("drm: bridge: samsung-dsim: Select GENERIC_PHY_MIPI_DPHY")
Link lore.kernel.org/r/[email protected]
Cc Adam Ford <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Guido Günther <[email protected]>
Cc Robert Chiras <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Robert Foss <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/bridge/Kconfig         |    2 ++
 drivers/gpu/drm/bridge/cadence/Kconfig |    1 +
 2 files changed, 3 insertions(+)
drivers/gpu/drm/bridge/cadence/Kconfig +1 -0
diff -- a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig
@@ -4,6 +4,7 @@ config DRM_CDNS_DSI
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL_BRIDGE
+	select GENERIC_PHY
 	select GENERIC_PHY_MIPI_DPHY
 	depends on OF
 	help
drivers/gpu/drm/bridge/Kconfig +2 -0
diff -- a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
@@ -181,6 +181,7 @@ config DRM_NWL_MIPI_DSI
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL_BRIDGE
+	select GENERIC_PHY
 	select GENERIC_PHY_MIPI_DPHY
 	select MFD_SYSCON
 	select MULTIPLEXER
@@ -227,6 +228,7 @@ config DRM_SAMSUNG_DSIM
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL_BRIDGE
+	select GENERIC_PHY
 	select GENERIC_PHY_MIPI_DPHY
 	help
 	  The Samsung MIPI DSIM bridge controller driver.
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 9 lines · Randy Dunlap

Three DRM bridge drivers select GENERIC_PHY_MIPI_DPHY when GENERIC_PHY might not be set. This causes Kconfig warnings and a build error.

WARNING: unmet direct dependencies detected for GENERIC_PHY_MIPI_DPHY
Depends on [n]: GENERIC_PHY [=n]
Selected by [y]:
- DRM_NWL_MIPI_DSI [=y] && DRM_BRIDGE [=y] && DRM [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]
- DRM_SAMSUNG_DSIM [=y] && DRM [=y] && DRM_BRIDGE [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]

Quoted 6 lines

(drm/bridge/cadence/Kconfig was found by inspection.)

aarch64-linux-ld: drivers/gpu/drm/bridge/samsung-dsim.o: in function `samsung_dsim_set_phy_ctrl':
drivers/gpu/drm/bridge/samsung-dsim.c:731: undefined reference to `phy_mipi_dphy_get_default_config_for_hsclk'

Prevent these warnings and build error by also selecting GENERIC_PHY

n> whenever selecting GENERIC_PHY_MIPI_DPHY.

Quoted 47 lines
Fixes fced5a364dee ("drm/bridge: cdns: Convert to phy framework")
Fixes 44cfc6233447 ("drm/bridge: Add NWL MIPI DSI host controller support")
Fixes 171b3b1e0f8b ("drm: bridge: samsung-dsim: Select GENERIC_PHY_MIPI_DPHY")
Link lore.kernel.org/r/[email protected]
Cc Adam Ford <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Guido Günther <[email protected]>
Cc Robert Chiras <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Robert Foss <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/bridge/Kconfig         |    2 ++
 drivers/gpu/drm/bridge/cadence/Kconfig |    1 +
 2 files changed, 3 insertions(+)

diff -- a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig

drivers/gpu/drm/bridge/cadence/Kconfig +1 -0
@@ -4,6 +4,7 @@ config DRM_CDNS_DSI
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL_BRIDGE
+	select GENERIC_PHY
 	select GENERIC_PHY_MIPI_DPHY
 	depends on OF
 	help

diff -- a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig

drivers/gpu/drm/bridge/Kconfig +1 -0
@@ -181,6 +181,7 @@ config DRM_NWL_MIPI_DSI
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL_BRIDGE
+	select GENERIC_PHY
 	select GENERIC_PHY_MIPI_DPHY
 	select MFD_SYSCON
 	select MULTIPLEXER

drivers/gpu/drm/bridge/Kconfig config DRM_SAMSUNG_DSIM · line 234

Quoted 7 lines
drivers/gpu/drm/bridge/Kconfig +1 -0
@@ -227,6 +228,7 @@ config DRM_SAMSUNG_DSIM
 	select DRM_KMS_HELPER
 	select DRM_MIPI_DSI
 	select DRM_PANEL_BRIDGE
+	select GENERIC_PHY
 	select GENERIC_PHY_MIPI_DPHY
 	help
 	  The Samsung MIPI DSIM bridge controller driver.

For NWL:

Cheers,
-- Guido

#2 lore raw

Thank you for resolving this issue so quickly!

I've applied the patch locally and gone through the reproduction steps. The kernel builds fine now.

Quoted 80 lines · Guido Günther

Hi,

Quoted 9 lines · Randy Dunlap

Three DRM bridge drivers select GENERIC_PHY_MIPI_DPHY when GENERIC_PHY might not be set. This causes Kconfig warnings and a build error.

WARNING: unmet direct dependencies detected for GENERIC_PHY_MIPI_DPHY
Depends on [n]: GENERIC_PHY [=n]
Selected by [y]:
- DRM_NWL_MIPI_DSI [=y] && DRM_BRIDGE [=y] && DRM [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]
- DRM_SAMSUNG_DSIM [=y] && DRM [=y] && DRM_BRIDGE [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]

Quoted 6 lines

(drm/bridge/cadence/Kconfig was found by inspection.)

aarch64-linux-ld: drivers/gpu/drm/bridge/samsung-dsim.o: in function `samsung_dsim_set_phy_ctrl':
drivers/gpu/drm/bridge/samsung-dsim.c:731: undefined reference to `phy_mipi_dphy_get_default_config_for_hsclk'

Prevent these warnings and build error by also selecting GENERIC_PHY

n> whenever selecting GENERIC_PHY_MIPI_DPHY.

Quoted 47 lines
Fixes fced5a364dee ("drm/bridge: cdns: Convert to phy framework")
Fixes 44cfc6233447 ("drm/bridge: Add NWL MIPI DSI host controller support")
Fixes 171b3b1e0f8b ("drm: bridge: samsung-dsim: Select GENERIC_PHY_MIPI_DPHY")
Link lore.kernel.org/r/[email protected]
Cc Adam Ford <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Guido Günther <[email protected]>
Cc Robert Chiras <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Robert Foss <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/bridge/Kconfig         |    2 ++
 drivers/gpu/drm/bridge/cadence/Kconfig |    1 +
 2 files changed, 3 insertions(+)

diff -- a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig

drivers/gpu/drm/bridge/cadence/Kconfig +1 -0
@@ -4,6 +4,7 @@ config DRM_CDNS_DSI
      select DRM_KMS_HELPER
      select DRM_MIPI_DSI
      select DRM_PANEL_BRIDGE
+     select GENERIC_PHY
      select GENERIC_PHY_MIPI_DPHY
      depends on OF
      help

diff -- a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig

drivers/gpu/drm/bridge/Kconfig +1 -0
@@ -181,6 +181,7 @@ config DRM_NWL_MIPI_DSI
      select DRM_KMS_HELPER
      select DRM_MIPI_DSI
      select DRM_PANEL_BRIDGE
+     select GENERIC_PHY
      select GENERIC_PHY_MIPI_DPHY
      select MFD_SYSCON
      select MULTIPLEXER

drivers/gpu/drm/bridge/Kconfig config DRM_SAMSUNG_DSIM · line 234

Quoted 7 lines
drivers/gpu/drm/bridge/Kconfig +1 -0
@@ -227,6 +228,7 @@ config DRM_SAMSUNG_DSIM
      select DRM_KMS_HELPER
      select DRM_MIPI_DSI
      select DRM_PANEL_BRIDGE
+     select GENERIC_PHY
      select GENERIC_PHY_MIPI_DPHY
      help
        The Samsung MIPI DSIM bridge controller driver.

For NWL:

Cheers,
-- Guido

Reviewed-by on v1 1/1
#3 lore raw
In reply to Randy Dunlap
Quoted 10 lines · Randy Dunlap

Three DRM bridge drivers select GENERIC_PHY_MIPI_DPHY when GENERIC_PHY might not be set. This causes Kconfig warnings and a build error.

WARNING: unmet direct dependencies detected for GENERIC_PHY_MIPI_DPHY
Depends on [n]: GENERIC_PHY [=n]
Selected by [y]:
- DRM_NWL_MIPI_DSI [=y] && DRM_BRIDGE [=y] && DRM [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]
- DRM_SAMSUNG_DSIM [=y] && DRM [=y] && DRM_BRIDGE [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]

Quoted 8 lines

(drm/bridge/cadence/Kconfig was found by inspection.)

aarch64-linux-ld: drivers/gpu/drm/bridge/samsung-dsim.o: in function `samsung_dsim_set_phy_ctrl':
drivers/gpu/drm/bridge/samsung-dsim.c:731: undefined reference to `phy_mipi_dphy_get_default_config_for_hsclk'

Prevent these warnings and build error by also selecting GENERIC_PHY whenever selecting GENERIC_PHY_MIPI_DPHY.

Quoted 52 lines
Fixes fced5a364dee ("drm/bridge: cdns: Convert to phy framework")
Fixes 44cfc6233447 ("drm/bridge: Add NWL MIPI DSI host controller support")
Fixes 171b3b1e0f8b ("drm: bridge: samsung-dsim: Select GENERIC_PHY_MIPI_DPHY")
Link lore.kernel.org/r/[email protected]
Cc Adam Ford <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Guido Günther <[email protected]>
Cc Robert Chiras <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Robert Foss <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/bridge/Kconfig         |    2 ++
 drivers/gpu/drm/bridge/cadence/Kconfig |    1 +
 2 files changed, 3 insertions(+)

diff -- a/drivers/gpu/drm/bridge/cadence/Kconfig b/drivers/gpu/drm/bridge/cadence/Kconfig

drivers/gpu/drm/bridge/cadence/Kconfig +1 -0
@@ -4,6 +4,7 @@ config DRM_CDNS_DSI
        select DRM_KMS_HELPER
        select DRM_MIPI_DSI
        select DRM_PANEL_BRIDGE
+       select GENERIC_PHY
        select GENERIC_PHY_MIPI_DPHY
        depends on OF
        help

diff -- a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig

drivers/gpu/drm/bridge/Kconfig +2 -0
@@ -181,6 +181,7 @@ config DRM_NWL_MIPI_DSI
        select DRM_KMS_HELPER
        select DRM_MIPI_DSI
        select DRM_PANEL_BRIDGE
+       select GENERIC_PHY
        select GENERIC_PHY_MIPI_DPHY
        select MFD_SYSCON
        select MULTIPLEXER
@@ -227,6 +228,7 @@ config DRM_SAMSUNG_DSIM
        select DRM_KMS_HELPER
        select DRM_MIPI_DSI
        select DRM_PANEL_BRIDGE
+       select GENERIC_PHY
        select GENERIC_PHY_MIPI_DPHY
        help
          The Samsung MIPI DSIM bridge controller driver.
maintainer Applied
#4 lore raw
In reply to Randy Dunlap
Quoted 10 lines · Randy Dunlap

Three DRM bridge drivers select GENERIC_PHY_MIPI_DPHY when GENERIC_PHY might not be set. This causes Kconfig warnings and a build error.

WARNING: unmet direct dependencies detected for GENERIC_PHY_MIPI_DPHY
Depends on [n]: GENERIC_PHY [=n]
Selected by [y]:
- DRM_NWL_MIPI_DSI [=y] && DRM_BRIDGE [=y] && DRM [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]
- DRM_SAMSUNG_DSIM [=y] && DRM [=y] && DRM_BRIDGE [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]

[...]

Applied, thanks!

[1/1] drm: bridge: for GENERIC_PHY_MIPI_DPHY also select GENERIC_PHY

      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=96413b355a49

Rob