lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CYGUWBAM3D62.35CPP5HGEYJ3Y@fairphone.com>
Date: Wed, 17 Jan 2024 09:59:17 +0100
From: "Luca Weiss" <luca.weiss@...rphone.com>
To: <neil.armstrong@...aro.org>, "Andrzej Hajda" <andrzej.hajda@...el.com>,
 "Robert Foss" <rfoss@...nel.org>, "Laurent Pinchart"
 <Laurent.pinchart@...asonboard.com>, "Jonas Karlman" <jonas@...boo.se>,
 "Jernej Skrabec" <jernej.skrabec@...il.com>, "Maarten Lankhorst"
 <maarten.lankhorst@...ux.intel.com>, "Maxime Ripard" <mripard@...nel.org>,
 "Thomas Zimmermann" <tzimmermann@...e.de>, "David Airlie"
 <airlied@...il.com>, "Daniel Vetter" <daniel@...ll.ch>
Cc: <~postmarketos/upstreaming@...ts.sr.ht>, <phone-devel@...r.kernel.org>,
 <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/bridge: Select DRM_KMS_HELPER for DRM_PANEL_BRIDGE

On Mon Jan 15, 2024 at 9:43 AM CET, Neil Armstrong wrote:
> Hi Luca,
>
> On 11/01/2024 13:38, Luca Weiss wrote:
> > Since the kconfig symbol of DRM_PANEL_BRIDGE is only adding
> > bridge/panel.o to drm_kms_helper object, we need to select
> > DRM_KMS_HELPER to make sure the file is actually getting built.
> > 
> > Otherwise with certain defconfigs e.g. devm_drm_of_get_bridge will not
> > be properly available:
> > 
> >    aarch64-linux-gnu-ld: drivers/phy/qualcomm/phy-qcom-qmp-combo.o: in function `qmp_combo_bridge_attach':
> >    drivers/phy/qualcomm/phy-qcom-qmp-combo.c:3204:(.text+0x8f4): undefined reference to `devm_drm_of_get_bridge'
> > 
> > Signed-off-by: Luca Weiss <luca.weiss@...rphone.com>
> > ---
> > I can see "depends on DRM_KMS_HELPER" was removed with commit
> > 3c3384050d68 ("drm: Don't make DRM_PANEL_BRIDGE dependent on DRM_KMS_HELPERS")
> > 
> > I'm not too familiar with Kconfig but it feels more correct if
> > PHY_QCOM_QMP_COMBO selects DRM_PANEL_BRIDGE that that's enough; and it
> > doesn't also has to explicitly select DRM_KMS_HELPER because of how the
> > objects are built in the Makefile.
> > 
> > Alternatively solution to this patch could be adjusting this line in
> > include/drm/drm_bridge.h:
> > 
> >    -#if defined(CONFIG_OF) && defined(CONFIG_DRM_PANEL_BRIDGE)
> >    +#if defined(CONFIG_OF) && defined(CONFIG_DRM_PANEL_BRIDGE) && defined(CONFIG_DRM_KMS_HELPER)
> >     struct drm_bridge *devm_drm_of_get_bridge(struct device *dev, struct device_node *node,
> >                                              u32 port, u32 endpoint);
> > 
> > .. and then selecting DRM_KMS_HELPER for PHY_QCOM_QMP_COMBO.
> > 
> > But I think the solution in this patch is better. Let me know what you
> > think.
>
> I think this is no more the case after on linux-next:
> 35921910bbd0 phy: qcom: qmp-combo: switch to DRM_AUX_BRIDGE
>
> But could you still check ?

On next-20240117 the error happens in the aux-bridge file instead then.

aarch64-linux-gnu-ld: drivers/gpu/drm/bridge/aux-bridge.o: in function `drm_aux_bridge_probe':
drivers/gpu/drm/bridge/aux-bridge.c:115:(.text+0xe0): undefined reference to `devm_drm_of_get_bridge'

I'm attaching the defconfig with which I can reproduce this but it's
really just DRM_KMS_HELPER=n and PHY_QCOM_QMP_COMBO=y I believe.

Regards
Luca


>
> Neil
>
> > ---
> >   drivers/gpu/drm/bridge/Kconfig | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
> > index ac9ec5073619..ae782b427829 100644
> > --- a/drivers/gpu/drm/bridge/Kconfig
> > +++ b/drivers/gpu/drm/bridge/Kconfig
> > @@ -8,6 +8,7 @@ config DRM_BRIDGE
> >   config DRM_PANEL_BRIDGE
> >   	def_bool y
> >   	depends on DRM_BRIDGE
> > +	select DRM_KMS_HELPER
> >   	select DRM_PANEL
> >   	help
> >   	  DRM bridge wrapper of DRM panels
> > 
> > ---
> > base-commit: b9c3a1fa6fb324e691a03cf124b79f4842e65d76
> > change-id: 20240111-drm-panel-bridge-fixup-5c2977fb969f
> > 
> > Best regards,



View attachment ".config" of type "text/plain" (145386 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ