From patchwork Thu Jan 11 12:38:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 187366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1415598dyi; Thu, 11 Jan 2024 04:38:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHq3tX9CgxYVLhm4O8I+m1Zh/0wr3eNInpoLZmlXh1EdHzt654imkmdH+dJYmPl6bOpwFz2 X-Received: by 2002:aa7:c58e:0:b0:558:83e6:9897 with SMTP id g14-20020aa7c58e000000b0055883e69897mr588555edq.30.1704976705791; Thu, 11 Jan 2024 04:38:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704976705; cv=none; d=google.com; s=arc-20160816; b=tZAKfW9BjLxZcDzNLbxjIHfjhP1Sqtg3p5cfVIHiNxyAcZgf5VNKmuzZJsPXIGPNNX bboEyxIpnDCvhCPc6OleYWSIRvprbYAqR4IxqlEu+qXXh/bEefZql7t6LnWLMx54o7Vj S3fLy1XPMcXpJXUDBWzFINUZFHeN/pGgyzWSDOZbS6P/R7ppNQMkoUPGliXMc/HL+a7t NJbJPDUeCYQO6zFdE7eMoKQa8LDp+j9BM8+YZrII6DHTceZmRJON1PPQBdMUPUYp4EQ2 n+9o73jG6vNCr+fj0f+co8CzwX6xtMBy2jJBwLVbCTk6NbeXDr3dTeNkLL+7nuPlk2Ta P8MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=+XZHSK5UfHc5sjsdpUXXLYF4irR5NRORWCsoV/mlT0k=; fh=m3wdR1DmjHnwO8GrgV4hlVl6jUJ8HcOIzEDcl0p/Xl8=; b=ZveodMiyDfPlDrSyktwZKqWCNQox/+yCCKCuNXoYAffSIu2O2sNnQMGlaSmk4lYKP8 vtTPGYNSIMjLreRDiiHOz1pTA8nOXqgame7Wei5U7j1ZU32MIoiejbALfaaxF/d7Mo+F L1M1B7TA7LF/XM3h03gFIuHkRaf8naKMqnQLUsBtQpGYglitBDny3R7y/ySm85sr+WUL xSeqEJCoYk3SFNq2xBiNR16x1YeaW1PJJuE88UTunUpUdLvBn6aZANFM5EUTPlXsj0WU ec5oBBmVeiXXPNOLZqqTi9TllgG5D52kufjmn7V6uwIgqRuGHLEtUp4uNoqWIUlcMJYo tBeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@fairphone.com header.s=fair header.b=yiZujOEu; spf=pass (google.com: domain of linux-kernel+bounces-23594-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23594-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s21-20020aa7d795000000b0055837912602si473533edq.393.2024.01.11.04.38.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 04:38:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23594-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@fairphone.com header.s=fair header.b=yiZujOEu; spf=pass (google.com: domain of linux-kernel+bounces-23594-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23594-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fairphone.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3BE181F2474F for ; Thu, 11 Jan 2024 12:38:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E88B15E8E; Thu, 11 Jan 2024 12:38:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b="yiZujOEu" Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 DF75A15ADF for ; Thu, 11 Jan 2024 12:38:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fairphone.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fairphone.com Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2cd7e348311so19457521fa.2 for ; Thu, 11 Jan 2024 04:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1704976687; x=1705581487; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=Ete2pqNcnu2TXhEIiwhI0CAEIAFmjp8VA7JbkeZ2gsc=; b=yiZujOEut6wA3R8QWdiNELede4hEQzJH919zsR7idBVdHPjfBZPTUjGuL/9eeTRSu4 AgGn6eKRBEGbSfFEtcqr5NGsh6a2wkcs5qa8zb9AyDCqy19EMU/yJj2P6muJFJyC6dcz EjousrMHje02ancQLkpLqd09Yq4+LD8uzmzJTj9nItowYYLbCf1OOecj0Ni5GAE+d8lR WyWNJNps9euiYwNzy7rpTd8dJ1V41CpwVH71GfXiKtmNHBr6tyqKdBhKrWRPhretpS1m EzYk4Maso5T9yfCM0BpHG3UtOVioMzBsK1ia6Wp8Bo2CXa5ZqylOIPWl2qT4zD+5q7fE XXqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704976687; x=1705581487; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ete2pqNcnu2TXhEIiwhI0CAEIAFmjp8VA7JbkeZ2gsc=; b=nXeQ86RPJVjxJYKKTYq3qEtapeBS+470mi/DFoFvu9vZMunrpv4T2DqP27wiJvZXcm s6eduGnZWK/9spWG25Prjy6mrk7PaEDDXkzSihEEynJ2GTxltSSMMVqp6qZp8B+gXQBe pdhIcqTUBqf7Ut4f4eRL5mpRhO0Mh/i0pIbunkG+n9+kbI39GO7yNbydA14IM67sO1AV UtjLcOO1B2zEn44g8Wxmg5OYZk44YLF9APv4eKWO45XGog2v4BXr+56xgf0zsAXS9qq2 0lGQ2UUoDAc/NDMQS1q8WwmD2hd1G8bx65dWcy7Y4iy47K7y14LQpY3lwnyymeTtbAl9 n0SA== X-Gm-Message-State: AOJu0Yyx4oCb6YVVkfI4Y01usccW0Ft5GLJyTMfd55bujSRf0i3EmvHA zdivBc5XYqds2QUZrvZ6POxw+ds4w3Enaw== X-Received: by 2002:a2e:2a83:0:b0:2cd:8276:933b with SMTP id q125-20020a2e2a83000000b002cd8276933bmr354940ljq.97.1704976686890; Thu, 11 Jan 2024 04:38:06 -0800 (PST) Received: from otso.luca.vpn.lucaweiss.eu (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id v23-20020a056402185700b005578654b081sm567335edy.23.2024.01.11.04.38.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 04:38:06 -0800 (PST) From: Luca Weiss Date: Thu, 11 Jan 2024 13:38:04 +0100 Subject: [PATCH] drm/bridge: Select DRM_KMS_HELPER for DRM_PANEL_BRIDGE Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240111-drm-panel-bridge-fixup-v1-1-e06292f6f500@fairphone.com> X-B4-Tracking: v=1; b=H4sIACvhn2UC/x2MSwqFMAwAryJZG7DFD31XERdqUw34aklRBPHuB pfDMHNDJmHK8CtuEDo58x4VTFnAvI5xIWSvDLaydWWMQS9/TGOkDSdhrz7wdSRsZuu6LkyudQE 0TkIqvnE/PM8LcW1MbGgAAAA= 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@lists.sr.ht, phone-devel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787797654089138384 X-GMAIL-MSGID: 1787797654089138384 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") 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(+) --- base-commit: b9c3a1fa6fb324e691a03cf124b79f4842e65d76 change-id: 20240111-drm-panel-bridge-fixup-5c2977fb969f Best regards, 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