All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/bridge-connector: select DRM_DISPLAY_HELPER from DRM_BRIDGE_CONNECTOR
@ 2024-10-18 15:08 Arnd Bergmann
  2024-10-18 15:42 ` Dmitry Baryshkov
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2024-10-18 15:08 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Dmitry Baryshkov, Philipp Zabel
  Cc: Arnd Bergmann, Jani Nikula, Geert Uytterhoeven, Imre Deak,
	dri-devel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The imx display drivers use the new bridge connector helpers but don't
explicitly select CONFIG_DRM_DISPLAY_HELPER, leading to a link failure
in rare configurations:

ld.lld-20: error: undefined symbol: drm_bridge_connector_init
>>> referenced by imx-ldb.c
>>>               drivers/gpu/drm/imx/ipuv3/imx-ldb.o:(imx_ldb_bind) in archive vmlinux.a
>>> referenced by parallel-display.c
>>>               drivers/gpu/drm/imx/ipuv3/parallel-display.o:(imx_pd_bind) in archive vmlinux.a

Move DRM_BRIDGE_CONNECTOR out of the DRM_DISPLAY_HELPER block and
instead select that symbol indirectly.

Fixes: f94b9707a1c9 ("drm/imx: parallel-display: switch to imx_legacy_bridge / drm_bridge_connector")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/display/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig
index 0f07cf1483ff..beb05d9bab50 100644
--- a/drivers/gpu/drm/display/Kconfig
+++ b/drivers/gpu/drm/display/Kconfig
@@ -11,14 +11,15 @@ config DRM_DISPLAY_HELPER
 	help
 	  DRM helpers for display adapters.
 
-if DRM_DISPLAY_HELPER
-
 config DRM_BRIDGE_CONNECTOR
 	bool
 	select DRM_DISPLAY_HDMI_STATE_HELPER
+	select DRM_DISPLAY_HELPER
 	help
 	  DRM connector implementation terminating DRM bridge chains.
 
+if DRM_DISPLAY_HELPER
+
 config DRM_DISPLAY_DP_AUX_CEC
 	bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support"
 	select DRM_DISPLAY_DP_HELPER
-- 
2.39.5


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

* Re: [PATCH] drm/bridge-connector: select DRM_DISPLAY_HELPER from DRM_BRIDGE_CONNECTOR
  2024-10-18 15:08 [PATCH] drm/bridge-connector: select DRM_DISPLAY_HELPER from DRM_BRIDGE_CONNECTOR Arnd Bergmann
@ 2024-10-18 15:42 ` Dmitry Baryshkov
  2024-10-18 16:01   ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Baryshkov @ 2024-10-18 15:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Philipp Zabel, Arnd Bergmann, Jani Nikula,
	Geert Uytterhoeven, Imre Deak, dri-devel, linux-kernel

On Fri, Oct 18, 2024 at 03:08:45PM +0000, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The imx display drivers use the new bridge connector helpers but don't
> explicitly select CONFIG_DRM_DISPLAY_HELPER, leading to a link failure
> in rare configurations:
> 
> ld.lld-20: error: undefined symbol: drm_bridge_connector_init
> >>> referenced by imx-ldb.c
> >>>               drivers/gpu/drm/imx/ipuv3/imx-ldb.o:(imx_ldb_bind) in archive vmlinux.a
> >>> referenced by parallel-display.c
> >>>               drivers/gpu/drm/imx/ipuv3/parallel-display.o:(imx_pd_bind) in archive vmlinux.a
> 
> Move DRM_BRIDGE_CONNECTOR out of the DRM_DISPLAY_HELPER block and
> instead select that symbol indirectly.
> 
> Fixes: f94b9707a1c9 ("drm/imx: parallel-display: switch to imx_legacy_bridge / drm_bridge_connector")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I think a correct fix is to select DRM_DISPLAY_HELPER instead.

> ---
>  drivers/gpu/drm/display/Kconfig | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig
> index 0f07cf1483ff..beb05d9bab50 100644
> --- a/drivers/gpu/drm/display/Kconfig
> +++ b/drivers/gpu/drm/display/Kconfig
> @@ -11,14 +11,15 @@ config DRM_DISPLAY_HELPER
>  	help
>  	  DRM helpers for display adapters.
>  
> -if DRM_DISPLAY_HELPER
> -
>  config DRM_BRIDGE_CONNECTOR
>  	bool
>  	select DRM_DISPLAY_HDMI_STATE_HELPER
> +	select DRM_DISPLAY_HELPER
>  	help
>  	  DRM connector implementation terminating DRM bridge chains.
>  
> +if DRM_DISPLAY_HELPER
> +
>  config DRM_DISPLAY_DP_AUX_CEC
>  	bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support"
>  	select DRM_DISPLAY_DP_HELPER
> -- 
> 2.39.5
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH] drm/bridge-connector: select DRM_DISPLAY_HELPER from DRM_BRIDGE_CONNECTOR
  2024-10-18 15:42 ` Dmitry Baryshkov
@ 2024-10-18 16:01   ` Arnd Bergmann
  2024-10-18 16:07     ` Dmitry Baryshkov
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2024-10-18 16:01 UTC (permalink / raw)
  To: Dmitry Baryshkov, Arnd Bergmann
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Dave Airlie,
	Simona Vetter, Philipp Zabel, Jani Nikula, Geert Uytterhoeven,
	Imre Deak, dri-devel, linux-kernel

On Fri, Oct 18, 2024, at 15:42, Dmitry Baryshkov wrote:
> On Fri, Oct 18, 2024 at 03:08:45PM +0000, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> The imx display drivers use the new bridge connector helpers but don't
>> explicitly select CONFIG_DRM_DISPLAY_HELPER, leading to a link failure
>> in rare configurations:
>> 
>> ld.lld-20: error: undefined symbol: drm_bridge_connector_init
>> >>> referenced by imx-ldb.c
>> >>>               drivers/gpu/drm/imx/ipuv3/imx-ldb.o:(imx_ldb_bind) in archive vmlinux.a
>> >>> referenced by parallel-display.c
>> >>>               drivers/gpu/drm/imx/ipuv3/parallel-display.o:(imx_pd_bind) in archive vmlinux.a
>> 
>> Move DRM_BRIDGE_CONNECTOR out of the DRM_DISPLAY_HELPER block and
>> instead select that symbol indirectly.
>> 
>> Fixes: f94b9707a1c9 ("drm/imx: parallel-display: switch to imx_legacy_bridge / drm_bridge_connector")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> I think a correct fix is to select DRM_DISPLAY_HELPER instead.

I think I just didn't express that clearly enough, selecting
DRM_DISPLAY_HELPER is what I did and what I tried to explain:

>>  config DRM_BRIDGE_CONNECTOR
>>  	bool
>>  	select DRM_DISPLAY_HDMI_STATE_HELPER
>> +	select DRM_DISPLAY_HELPER
>>  	help
>>  	  DRM connector implementation terminating DRM bridge chains.

I had to move the 'if' block just to avoid a circular
dependency.

Or did you mean the imx driver is the one that should
'select DRM_DISPLAY_HELPER'? That would also work, but
adds a bit more complexity.

      Arnd

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

* Re: [PATCH] drm/bridge-connector: select DRM_DISPLAY_HELPER from DRM_BRIDGE_CONNECTOR
  2024-10-18 16:01   ` Arnd Bergmann
@ 2024-10-18 16:07     ` Dmitry Baryshkov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2024-10-18 16:07 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Dave Airlie, Simona Vetter, Philipp Zabel,
	Jani Nikula, Geert Uytterhoeven, Imre Deak, dri-devel,
	linux-kernel

On Fri, Oct 18, 2024 at 04:01:17PM +0000, Arnd Bergmann wrote:
> On Fri, Oct 18, 2024, at 15:42, Dmitry Baryshkov wrote:
> > On Fri, Oct 18, 2024 at 03:08:45PM +0000, Arnd Bergmann wrote:
> >> From: Arnd Bergmann <arnd@arndb.de>
> >> 
> >> The imx display drivers use the new bridge connector helpers but don't
> >> explicitly select CONFIG_DRM_DISPLAY_HELPER, leading to a link failure
> >> in rare configurations:
> >> 
> >> ld.lld-20: error: undefined symbol: drm_bridge_connector_init
> >> >>> referenced by imx-ldb.c
> >> >>>               drivers/gpu/drm/imx/ipuv3/imx-ldb.o:(imx_ldb_bind) in archive vmlinux.a
> >> >>> referenced by parallel-display.c
> >> >>>               drivers/gpu/drm/imx/ipuv3/parallel-display.o:(imx_pd_bind) in archive vmlinux.a
> >> 
> >> Move DRM_BRIDGE_CONNECTOR out of the DRM_DISPLAY_HELPER block and
> >> instead select that symbol indirectly.
> >> 
> >> Fixes: f94b9707a1c9 ("drm/imx: parallel-display: switch to imx_legacy_bridge / drm_bridge_connector")
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > I think a correct fix is to select DRM_DISPLAY_HELPER instead.
> 
> I think I just didn't express that clearly enough, selecting
> DRM_DISPLAY_HELPER is what I did and what I tried to explain:
> 
> >>  config DRM_BRIDGE_CONNECTOR
> >>  	bool
> >>  	select DRM_DISPLAY_HDMI_STATE_HELPER
> >> +	select DRM_DISPLAY_HELPER
> >>  	help
> >>  	  DRM connector implementation terminating DRM bridge chains.
> 
> I had to move the 'if' block just to avoid a circular
> dependency.
> 
> Or did you mean the imx driver is the one that should
> 'select DRM_DISPLAY_HELPER'? That would also work, but
> adds a bit more complexity.

Yes, I proposed this solution. I think this is what other drivers do.


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2024-10-18 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 15:08 [PATCH] drm/bridge-connector: select DRM_DISPLAY_HELPER from DRM_BRIDGE_CONNECTOR Arnd Bergmann
2024-10-18 15:42 ` Dmitry Baryshkov
2024-10-18 16:01   ` Arnd Bergmann
2024-10-18 16:07     ` Dmitry Baryshkov

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.