Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp86245lqt; Mon, 18 Mar 2024 02:04:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwrzCWSD6FS9Lxqz8h8+1ryOkYXmpmYS4rUjqBSpibuep2UZWcv4VFJsp4buIRlaMMLA6VeK+/JhLgnQcdP8dBuCJ3vujIZoRBbnLFEA== X-Google-Smtp-Source: AGHT+IFchiQh8XsnHQGtUwfXmKc7y/nvFUgRr77IN4Jc5Ijyj/uHY4yek5ANjYUs3zjJ+XGaQbfp X-Received: by 2002:ad4:4c42:0:b0:693:73f9:8f72 with SMTP id cs2-20020ad44c42000000b0069373f98f72mr6073915qvb.31.1710752679681; Mon, 18 Mar 2024 02:04:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710752679; cv=pass; d=google.com; s=arc-20160816; b=zgusZOLvTYjKWwJn3t4WfrNUOIPcs9zcXHIEXDcoTAo2qMcvBRgOWQ5aDc2sUrnmw9 stUNkRXG2pechu+oKTGV5gJXmoXQ6zS42c09F/vmSO0yRy7eOS/XQeK+SCP7bL4ngoPL hD5oYzEWzluPGKo9An+WgQc6sfzq8HWQg8Fub5pdiapCerRQ/wOy/sXN45hii3Gj+VyD HStuOpG4nCi2UY0iMzlSa/gUIq8H7AGvcFSMYXkoaencgIvpgOSmtBXFQPWuvoEr7Ki4 hlgysX+0agG/yKkl6NCz1oNSkTA8CEDCZWr/Xf+JNBC2ZXtofYSi0bhbsCltAy1sFN1M RCJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=Cx67NFg6k3z/hP6o29yTje1Tqs03MrVFCP2cg904mNo=; fh=c/ED/PZkyBhrnxqrhEFMtZKpr+/1iqaaprsl3qy/PGI=; b=YnY1KGndK/j6/m9Q/VclA0uqobr32nk38ZAfBQRZ03iX0kr8QhUUT+C0TkksoV4/O7 zx8X702KQgdb6Z3eqpEYvYpT5b4RH3uceJdXfedUYbfVZxukqNT0aXj5bF2zmDeJHK4h nGtWY+T+BUpzrRcplXUVId7HDY4GewDiLbtsI+VLxRbPKz0voXItcigwNY+kkUX8+UZN Bu6rTJ42xG9tv4N0DBNIiNOugeywcffCwsjk0CIWv83TAW4pDG9bLamcUfO2u9hJ3zY2 +cxZh6+2xR678NNivN6k1uzPvIbhw5MxiAQSastjPCxYlMfXDL9+F0Z7aMdI1blCQKny lKpQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vXj2NRw9; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-105846-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a14-20020a0562140c2e00b00690db7656eesi7720016qvd.57.2024.03.18.02.04.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 02:04:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105846-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vXj2NRw9; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-105846-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 47AAF1C2167D for ; Mon, 18 Mar 2024 09:04:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C873D28DDA; Mon, 18 Mar 2024 09:04:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vXj2NRw9" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FBFA25634 for ; Mon, 18 Mar 2024 09:04:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710752674; cv=none; b=hDgqHiF+hagYMDjRQNUdl7ouR4l/QtLfZMjGpI+/KW9Est+PJoAqi1SvSVSyIh13hk0ZOKdLqCYob/q7UFOsP1opZTL8KXxpn/cgTZdsKJ+HVIOomnkKs1lHbvG5Tw2kHP59eO/stdn65aTVJ6UQ6T1Tkup85ciA+DwvKle7JpQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710752674; c=relaxed/simple; bh=0s+Bo+G3KaxZiyGMieudAdG3u3JDO1GgJ+Hl/tmhrtE=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=jM2wXrrJRSQsNS2zwM99LCGFINFRTYqGjjE5Vt53rOtjrRIr8RrD2+e4POSXLjQ4o6hcACPBC6pLN5WU1zvZckNmw2frVhf0VMdyJ5o84Ult3aLXrq+wPfWqdspVmn9K3PKuAPJK0qmlIjcx8f48ZnIlw+zDVzy3ffekag+Jy64= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=vXj2NRw9; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-513cfc93f4eso4586059e87.3 for ; Mon, 18 Mar 2024 02:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710752670; x=1711357470; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=Cx67NFg6k3z/hP6o29yTje1Tqs03MrVFCP2cg904mNo=; b=vXj2NRw9MNox67D+wkU8HsYWhHBLbkNl4QBADKGFkV2nbcVlijcQq6hv3aIb+6WqCr j9OXfay3OH7s0kw2ogMtWHerETPsAsEKrC+kyBsSWg2RnVCDRiBIbarA82S7+LPULhn6 qW3H/zRbpg+kHxhlqzwO2QWb8k3GHaW7pgnjZHDhSxn1wIaWpECEtqY3ugt1rRUKHR3f YhzghcdZ5rnGwy6VQZB2vcf5l24KiwX3OOT5o2r4neGJUiKaI6w5Ow4LqFA7HFaufFrh VHa9u9DM4dprBP0NajmSEnXQh6ub+ypZtOGZNaeAxKSikCojhFEnMgFW2T1JuxHB27py W9WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710752670; x=1711357470; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=Cx67NFg6k3z/hP6o29yTje1Tqs03MrVFCP2cg904mNo=; b=rliA0uY3IHjPlN+xw8oaYDEWfruX0wrKru/pS01UxHjwh09WuSd13IiNDHe2+NWCTi MQfXAKqVBrE4sEuVj/28WQivRxGNvtE7RxpKSE+r7fJcuHdWFXYdfXElPLeWUGfzLE4i CMpjAgS+jet3jWWvh4esVf9GDlAaPnqhdBExurOkYxIwqCyHZRb9FMOKSHa9bKdUbKYh Ym0hkGkrS0t4u5omocpU84jfpeyJHsiqrAi3EcLZOce33rUWbFy6I8W5CzKOyekHfgDv cOjMY0r1RzRLn3gGr7QKw9PkKaMnJ/3PfgnxrEwBviyEGqzNlw+8I9S0Y0D+I2kQqbIB hhTQ== X-Forwarded-Encrypted: i=1; AJvYcCX+oM0OZAVajtQn9g/R2rFYvYe/nZlniy4ia+zsBiuKkF98VGXCjgdNIOLhRXHH4OSJaDlU7fkV/BQNYxOLVc6tQOBR0Tt9tpbq3eou X-Gm-Message-State: AOJu0Yzbd2QkX5saN5gJ+/fzO3zaoZ9OwuxyQ8RRrqWQEtWeIwSTTHhe 07aaqnOpYkghlWftlMinsMvgPd0F2rCp+5i+ser1bxuLJly3UKuJUQYDuI0sKCc= X-Received: by 2002:a19:2d15:0:b0:513:2329:4308 with SMTP id k21-20020a192d15000000b0051323294308mr8336569lfj.14.1710752669525; Mon, 18 Mar 2024 02:04:29 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:ad2b:a316:59d9:3dbc? ([2a01:e0a:982:cbb0:ad2b:a316:59d9:3dbc]) by smtp.gmail.com with ESMTPSA id r7-20020a05600c35c700b0041409fa57c4sm5752066wmq.34.2024.03.18.02.04.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Mar 2024 02:04:29 -0700 (PDT) Message-ID: <59580953-196b-482a-bbbd-7f0ff8da75f5@linaro.org> Date: Mon, 18 Mar 2024 10:04:28 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: neil.armstrong@linaro.org Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH] drm/bridge: Select DRM_KMS_HELPER for DRM_PANEL_BRIDGE Content-Language: en-US, fr To: Luca Weiss , Dmitry Baryshkov Cc: Andrzej Hajda , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20240111-drm-panel-bridge-fixup-v1-1-e06292f6f500@fairphone.com> Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQW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YJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro Developer Services In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 08/03/2024 10:29, Luca Weiss wrote: > On Sun Mar 3, 2024 at 9:37 PM CET, Dmitry Baryshkov wrote: >> On Thu, 29 Feb 2024 at 11:27, Luca Weiss wrote: >>> >>> On Wed Jan 17, 2024 at 9:59 AM CET, Luca Weiss wrote: >>>> 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 >>>>>> --- >>>>>> 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") >> >> Could you please make sure that the usecase described in the mentioned >> commit message doesn't get broken by your change? > > Hi Neil, > > The problem fixed in that linked patch (3c3384050d68) is about fixing > undefined reference errors with specific .config setups - similar to > this patch. > > Since we're only adding a 'select' and not removing anything I don't see > how it could cause new errors like that, and it does fix the one I'm > describing. > > And also I checked again and I don't see any circular dependencies > (something that was also mentioned in the linked patch), so apart from > what I mentioned with that I'm not too familiar when 'select' should be > used and when 'depend' should be used, it's good from my perspective. Sure, LGTM: Reviewed-by: Neil Armstrong > > Regards > Luca > >> >>>>>> >>>>>> 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. >>> >>> Hi Neil, >>> >>> Ping on this patch >>> >>> Regards >>> Luca >>> >>>> >>>> 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, >>> >