Commit b26c04f4 authored by Jean Delvare's avatar Jean Delvare Committed by Inki Dae

drm/exynos: Fix PTN3460 dependency

The following configuration options combination:

CONFIG_DRM_EXYNOS_DP=y
CONFIG_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.
Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 66367461
...@@ -83,6 +83,8 @@ config DRM_KMS_CMA_HELPER ...@@ -83,6 +83,8 @@ config DRM_KMS_CMA_HELPER
source "drivers/gpu/drm/i2c/Kconfig" source "drivers/gpu/drm/i2c/Kconfig"
source "drivers/gpu/drm/bridge/Kconfig"
config DRM_TDFX config DRM_TDFX
tristate "3dfx Banshee/Voodoo3+" tristate "3dfx Banshee/Voodoo3+"
depends on DRM && PCI depends on DRM && PCI
...@@ -199,5 +201,3 @@ source "drivers/gpu/drm/msm/Kconfig" ...@@ -199,5 +201,3 @@ source "drivers/gpu/drm/msm/Kconfig"
source "drivers/gpu/drm/tegra/Kconfig" source "drivers/gpu/drm/tegra/Kconfig"
source "drivers/gpu/drm/panel/Kconfig" source "drivers/gpu/drm/panel/Kconfig"
source "drivers/gpu/drm/bridge/Kconfig"
...@@ -50,7 +50,7 @@ config DRM_EXYNOS_DSI ...@@ -50,7 +50,7 @@ config DRM_EXYNOS_DSI
config DRM_EXYNOS_DP config DRM_EXYNOS_DP
bool "EXYNOS DRM DP driver support" 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 default DRM_EXYNOS
help help
This enables support for DP device. This enables support for DP device.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment