drm/exynos: Fix PTN3460 dependency
Subsystems (4)
PATCH 1/1 drm/exynos: Fix PTN3460 dependency
The following configuration options combination:
CONFIG_DRM_EXYNOS_DP=yCONFIG_DRM_PTN3460=m
currently leads to the following linker failure:
drivers/built-in.o: In function `exynos_drm_attach_lcd_bridge':.../drivers/gpu/drm/exynos/exynos_dp_core.c:1004:
undefined reference to `ptn3460_init'
This is because ptn3460_init can't be implemented in a module while its caller is built into the kernel. So add the proper dependency in Kconfig so that the above can't happen.
I moved DRM_PTN3460 earlier in Kconfig, next to the I2C helper module section, so that the user has a chance to select it before moving to the Exynos-specific section.
IMHO the proper way to solve the problem would be to turn ptn3460 into a clean I2C driver, similar to the other I2C helper chip drivers. It's the only way to not sink into impossible-to-guess dependencies. Then ptn3460 could even be moved together with the other I2C helper chip drivers.
--- drivers/gpu/drm/Kconfig | 4 ++-- drivers/gpu/drm/exynos/Kconfig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/Kconfig +2 -2
@@ -83,6 +83,8 @@ config DRM_KMS_CMA_HELPER source "drivers/gpu/drm/i2c/Kconfig" +source "drivers/gpu/drm/bridge/Kconfig" + config DRM_TDFX tristate "3dfx Banshee/Voodoo3+" depends on DRM && PCI
@@ -199,5 +201,3 @@ source "drivers/gpu/drm/msm/Kconfig" source "drivers/gpu/drm/tegra/Kconfig" source "drivers/gpu/drm/panel/Kconfig" - -source "drivers/gpu/drm/bridge/Kconfig"
drivers/gpu/drm/exynos/Kconfig +1 -1
@@ -50,7 +50,7 @@ config DRM_EXYNOS_DSI config DRM_EXYNOS_DP bool "EXYNOS DRM DP driver support" - depends on DRM_EXYNOS && ARCH_EXYNOS + depends on DRM_EXYNOS && ARCH_EXYNOS && (DRM_PTN3460=n || DRM_PTN3460=y || DRM_PTN3460=DRM_EXYNOS) default DRM_EXYNOS help This enables support for DP device.
Signature · 2 lines
Jean Delvare SUSE L3 Support
Quoted 19 lines · Jean Delvare
The following configuration options combination:
CONFIG_DRM_EXYNOS_DP=yCONFIG_DRM_PTN3460=mcurrently leads to the following linker failure:
drivers/built-in.o: In function `exynos_drm_attach_lcd_bridge':.../drivers/gpu/drm/exynos/exynos_dp_core.c:1004:
undefined reference to `ptn3460_init'This is because
ptn3460_initcan't be implemented in a module while its caller is built into the kernel. So add the proper dependency inKconfigso that the above can't happen.I moved
DRM_PTN3460earlier inKconfig, next to the I2C helper module section, so that the user has a chance to select it before moving to the Exynos-specific section.
Quoted 5 lines
IMHO the proper way to solve the problem would be to turn ptn3460 into a clean I2C driver, similar to the other I2C helper chip drivers. It's the only way to not sink into impossible-to-guess dependencies. Then ptn3460 could even be moved together with the other I2C helper chip drivers.
FWIW, various ideas have been discussed to solve this problem. The most recent agreement I think was to create a registry for bridge drivers to register DRM bridge objects against and allow drivers to look them up. That way we can get rid of the various *_init() functions that currently need to be called directly from within DRM drivers.
I'm not aware of anybody working on this currently, hence I think this is an appropriate fix in the meantime:
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainerQuoted 26 lines · Thierry Reding
Quoted 19 lines · Jean Delvare
The following configuration options combination:
CONFIG_DRM_EXYNOS_DP=yCONFIG_DRM_PTN3460=mcurrently leads to the following linker failure:
drivers/built-in.o: In function `exynos_drm_attach_lcd_bridge':.../drivers/gpu/drm/exynos/exynos_dp_core.c:1004:
undefined reference to `ptn3460_init'This is because
ptn3460_initcan't be implemented in a module while its caller is built into the kernel. So add the proper dependency inKconfigso that the above can't happen.I moved
DRM_PTN3460earlier inKconfig, next to the I2C helper module section, so that the user has a chance to select it before moving to the Exynos-specific section.Quoted 5 lines
IMHO the proper way to solve the problem would be to turn ptn3460 into a clean I2C driver, similar to the other I2C helper chip drivers. It's the only way to not sink into impossible-to-guess dependencies. Then ptn3460 could even be moved together with the other I2C helper chip drivers.
Quoted 6 lines
FWIW, various ideas have been discussed to solve this problem. The most recent agreement I think was to create a registry for bridge drivers to register DRM bridge objects against and allow drivers to look them up. That way we can get rid of the various
*_init()functions that currently need to be called directly from within DRM drivers.
I tend to prefer integrated drm_bridge based on drm_panel infrastructure so that bridge drivers can use Linux driver-model. But it seems not easy to reach a consensus on it.
picked it up.
Thanks,
Inki Dae
Quoted 12 lines
I'm not aware of anybody working on this currently, hence I think this is an appropriate fix in the meantime:
Reviewed-by Thierry Reding <[email protected]>_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel