All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Luca Weiss <luca.weiss@fairphone.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: ~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/bridge: Select DRM_KMS_HELPER for DRM_PANEL_BRIDGE
Date: Mon, 15 Jan 2024 09:43:32 +0100	[thread overview]
Message-ID: <b1da07f9-7e15-4d83-bef3-d0ce157654bc@linaro.org> (raw)
In-Reply-To: <20240111-drm-panel-bridge-fixup-v1-1-e06292f6f500@fairphone.com>

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@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.

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 ?

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,


WARNING: multiple messages have this Message-ID (diff)
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Luca Weiss <luca.weiss@fairphone.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/bridge: Select DRM_KMS_HELPER for DRM_PANEL_BRIDGE
Date: Mon, 15 Jan 2024 09:43:32 +0100	[thread overview]
Message-ID: <b1da07f9-7e15-4d83-bef3-d0ce157654bc@linaro.org> (raw)
In-Reply-To: <20240111-drm-panel-bridge-fixup-v1-1-e06292f6f500@fairphone.com>

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@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.

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 ?

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,


  reply	other threads:[~2024-01-15  8:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1da07f9-7e15-4d83-bef3-d0ce157654bc@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.weiss@fairphone.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=rfoss@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.