From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D463606A880 for ; Thu, 12 Nov 2026 15:39:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Ag2EDvIs; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=wD5zPBe6 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Subject:From:To: Cc:Message-Id:Date:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=JkDe9wn7tMWfSI+pbo3Y9jWzoAK1SZbFrM56WclXIC4=; b=Ag2EDvIslCw0zHd2deZL7AGztE 5HP3ACVhhcBcce3XhmZ2pfHhTx16Yy/AGIRmY8+jqY40tEGP7vJ9M+sw2KRQbI1BJNE0gzIEnAjcY pq1GTDE7haYuzBXq0elZ0Z71cUqF+r5RjWMhmFI9sD7mxt5kLLRI2XWTuwob5Qr+kcK7KdTKBmHOv kyjHAXHCkIwSus9iAmOR2S4xu67ywE67Ub3TD9Mha1prZ2laTRnJR01jiXx2udOkXCwUypWefIerp Iec3RN+sMKfJNveDNjR237nXwmdn+RpCe2kcIiHQCIPjZ2wKi7KkRd9L+u1DoMcQ3UIXNaeKqa9AI Kjq2D7Pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xRWta-0000000AUGV-2S1E; Thu, 12 Nov 2026 15:39:26 +0000 Received: from smtpout-04.galae.net ([185.171.202.116]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xRWtX-0000000AUEu-03XD for linux-rockchip@lists.infradead.org; Thu, 12 Nov 2026 15:39:25 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id CA7AEC79A9C; Thu, 12 Nov 2026 15:39:21 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7BD705FF85; Thu, 12 Nov 2026 15:39:19 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8C23B11BC12B5; Thu, 12 Nov 2026 16:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1794497954; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=JNnYp35o/nf6vmTuNBxPUZDLjYmnLfH8FNhphGFUILw=; b=wD5zPBe6kaum/BhnlH6o+LaQ7BAShR19kjnPomalW1TpQGj6uPuqzef7EcWSGlDS1OF8SH DSTpRZNPSr6dZhWViBlT+EdYHo/E2WR0ink4eAqmHj8FvCWiZztJ7R+X9Mxi9SAh75cIfW 9ndpaN6jBbDTTQ6PBJ5Y3SUlTGmj99QYHcxyy4vsV5txUrG6ak/t7JCioBN+gM3RkPDBn8 aaK7KGVaPok38beWMpECPkVhTserR9yBDYI0SwAlrvXJM8LFO+qk9Tv6SJJVrJA2HMa3Lo xkBkqyucxvXaR2FllFwFLk2SWwCN4yi4rZvDSaRP0v1dgw0sLMDEO5w4PAAqgA== X-Archived-By: Mime-Version: 1.0 Date: Thu, 12 Nov 2026 16:39:06 +0100 Message-Id: Cc: "Damon Ding" , , , , To: "Jun Yan" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Luca Ceresoli" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Heiko Stuebner" From: "Luca Ceresoli" Subject: Re: [PATCH v3] drm/bridge: analogix_dp: use devm_phy_optional_get() for the DP PHY X-Mailer: aerc 0.22.0 References: <20261110023721.2014061-1-jerrysteve1101@gmail.com> In-Reply-To: <20261110023721.2014061-1-jerrysteve1101@gmail.com> X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261112_073923_445338_E6F3A46E X-CRM114-Status: GOOD ( 21.11 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hello, On Tue Nov 10, 2026 at 3:37 AM CET, Jun Yan wrote: > The DP PHY is optional: the Rockchip RK3399 eDP controller (used as the > internal eDP port) has no separate PHY device and relies on its built-in > PHY, which is programmed directly through the GRF registers, so its DT > node carries no "phys"/"phy-names" property. > > Requesting the PHY with devm_phy_get() therefore returns -ENODEV (or > -ENOSYS when CONFIG_GENERIC_PHY is disabled) and the driver logs a > misleading "no DP phy configured" error at probe time before falling back > to a NULL phy. > > Use devm_phy_optional_get() instead, which returns NULL when the PHY is > absent and otherwise behaves identically, and drop the manual -ENODEV/ > -ENOSYS handling. This also removes the spurious error message. > > Signed-off-by: Jun Yan > Reviewed-by: Damon Ding > --- > Changes in v3: > - Add missing changelog entries and reference links > - Link to v2: https://lore.kernel.org/dri-devel/20261013134659.335829-1-jerrysteve1101@gmail.com/ > > Changes in v2: > - Added comments to explain the changes made. > - Link to v1: https://lore.kernel.org/dri-devel/20260924020417.868588-1-jerrysteve1101@gmail.com/ > > .../drm/bridge/analogix/analogix_dp_core.c | 22 ++++++------------- > 1 file changed, 7 insertions(+), 15 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index 6df6963740d2..637b1bff0f6c 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -1426,21 +1426,13 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data) > if (ret) > return ERR_PTR(ret); > > - dp->phy = devm_phy_get(dp->dev, "dp"); > - if (IS_ERR(dp->phy)) { > - dev_err(dp->dev, "no DP phy configured\n"); > - ret = PTR_ERR(dp->phy); > - if (ret) { > - /* > - * phy itself is not enabled, so we can move forward > - * assigning NULL to phy pointer. > - */ > - if (ret == -ENOSYS || ret == -ENODEV) > - dp->phy = NULL; > - else > - return ERR_PTR(ret); > - } > - } > + /* > + * RK3288/RK3399 use Analogix DP controller built-in PHY, > + * no extra PHY configuration is required. > + */ > + dp->phy = devm_phy_optional_get(dp->dev, "dp"); > + if (IS_ERR(dp->phy)) > + return ERR_CAST(dp->phy); The original code ignbores -ENOSYS, devm_phy_optional_get() does not. So, either -ENOSYS was just impossible, or this patch potentially changes the behaviour. Can you elaborate on that? Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip