All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: Fix PTN3460 dependency
@ 2014-05-20  9:15 Jean Delvare
  2014-05-21 15:51 ` Thierry Reding
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2014-05-20  9:15 UTC (permalink / raw)
  To: dri-devel; +Cc: Kukjin Kim, Seung-Woo Kim, Alexander Graf, Kyungmin Park

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: Jean Delvare <jdelvare@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
---
 drivers/gpu/drm/Kconfig        |    4 ++--
 drivers/gpu/drm/exynos/Kconfig |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

--- linux-3.15-rc5.orig/drivers/gpu/drm/Kconfig	2014-04-14 09:42:29.689070224 +0200
+++ linux-3.15-rc5/drivers/gpu/drm/Kconfig	2014-05-19 14:47:02.872050099 +0200
@@ -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"
--- linux-3.15-rc5.orig/drivers/gpu/drm/exynos/Kconfig	2014-04-14 09:42:29.698070438 +0200
+++ linux-3.15-rc5/drivers/gpu/drm/exynos/Kconfig	2014-05-19 15:23:18.867919528 +0200
@@ -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.


-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/exynos: Fix PTN3460 dependency
  2014-05-20  9:15 [PATCH] drm/exynos: Fix PTN3460 dependency Jean Delvare
@ 2014-05-21 15:51 ` Thierry Reding
  2014-05-22 11:27   ` Inki Dae
  0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2014-05-21 15:51 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Kyungmin Park, Kukjin Kim, Seung-Woo Kim, Alexander Graf, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1581 bytes --]

On Tue, May 20, 2014 at 11:15:25AM +0200, Jean Delvare wrote:
> 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.

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:

Reviewed-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/exynos: Fix PTN3460 dependency
  2014-05-21 15:51 ` Thierry Reding
@ 2014-05-22 11:27   ` Inki Dae
  0 siblings, 0 replies; 3+ messages in thread
From: Inki Dae @ 2014-05-22 11:27 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Kukjin Kim, Seung-Woo Kim, Alexander Graf, dri-devel,
	Kyungmin Park, Jean Delvare

On 2014년 05월 22일 00:51, Thierry Reding wrote:
> On Tue, May 20, 2014 at 11:15:25AM +0200, Jean Delvare wrote:
>> 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.
> 
> 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

> 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 <treding@nvidia.com>
> 
> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-22 11:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-20  9:15 [PATCH] drm/exynos: Fix PTN3460 dependency Jean Delvare
2014-05-21 15:51 ` Thierry Reding
2014-05-22 11:27   ` Inki Dae

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.