All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: Select DRM_KMS_HELPER for DRM_PANEL_BRIDGE
@ 2024-01-11 12:38 ` Luca Weiss
  0 siblings, 0 replies; 18+ messages in thread
From: Luca Weiss @ 2024-01-11 12:38 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter
  Cc: ~postmarketos/upstreaming, phone-devel, dri-devel, linux-kernel,
	Luca Weiss

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@fairphone.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.
---
 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,
-- 
Luca Weiss <luca.weiss@fairphone.com>


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

end of thread, other threads:[~2024-03-18 15:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11 12:38 [PATCH] drm/bridge: Select DRM_KMS_HELPER for DRM_PANEL_BRIDGE Luca Weiss
2024-01-11 12:38 ` Luca Weiss
2024-01-15  8:43 ` Neil Armstrong
2024-01-15  8:43   ` Neil Armstrong
2024-01-17  8:59   ` Luca Weiss
2024-01-17  8:59     ` Luca Weiss
2024-02-29  9:27     ` Luca Weiss
2024-03-03 20:37       ` Dmitry Baryshkov
2024-03-08  9:29         ` Luca Weiss
2024-03-18  9:04           ` neil.armstrong
2024-03-18  9:09 ` Neil Armstrong
2024-03-18 10:52   ` Jani Nikula
2024-03-18 10:59     ` Jani Nikula
2024-03-18 12:49       ` Imre Deak
2024-03-18 13:48       ` Luca Weiss
2024-03-18 15:24         ` Jani Nikula
2024-03-18 13:41     ` Ville Syrjälä
2024-03-18 14:08       ` Neil Armstrong

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.