From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF616FCC9DE for ; Tue, 10 Mar 2026 08:24:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2640310E22F; Tue, 10 Mar 2026 08:24:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=sntech.de header.i=@sntech.de header.b="JuC/yhxD"; dkim-atps=neutral Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4547610E22F for ; Tue, 10 Mar 2026 08:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Type:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To; bh=2W8R6JKoSWBQ/NVWe1VH8DTpdfOcfJODkzczD104anE=; b=JuC/yhxDoPy5BzKCllx+4lcx/F aT/7U8Uk8l3EzePnMXUbbxXawsxzRHryg8fghP2VOHv5kHVBckllNBimOOiJ0d8LfnHjtGmniMUoP q+tI4zY5GQIiNsEUe+qxnask3JoIfvvZdpBRFnoZGdldxQgpw2opTa6+/x5nJBA//K40leHf2j3eZ QL1kjydLamseRW0i8hF8yC9BA+ISD2o9MPNpUsGC0DfntkB9k4h7pa/Fd+8ADCPiSf0DDEzQCBI5M 9HJQrDTSAcTC9UmZ18rrV1bkPrtisS78iMGtNExAIokgAvG70PlOoOoPpo/Lna+ZPaU1pgFFTLn9P iDkZROYQ==; From: Heiko Stuebner To: linux-phy@lists.infradead.org, Vladimir Oltean Cc: Vinod Koul , Neil Armstrong , dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-can@vger.kernel.org, linux-gpio@vger.kernel.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, spacemit@lists.linux.dev, UNGLinuxDriver@microchip.com, Sandy Huang , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Subject: Re: [PATCH v3 phy-next 10/24] drm/rockchip: dw_hdmi: avoid direct dereference of phy->dev.of_node Date: Tue, 10 Mar 2026 09:24:43 +0100 Message-ID: <2218670.OBFZWjSADL@phil> In-Reply-To: <20260309190842.927634-11-vladimir.oltean@nxp.com> References: <20260309190842.927634-1-vladimir.oltean@nxp.com> <20260309190842.927634-11-vladimir.oltean@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Am Montag, 9. M=C3=A4rz 2026, 20:08:28 Mitteleurop=C3=A4ische Normalzeit sc= hrieb Vladimir Oltean: > The dw_hdmi-rockchip driver validates pixel clock rates against the > HDMI PHY's internal clock provider on certain SoCs like RK3328. > This is currently achieved by dereferencing hdmi->phy->dev.of_node > to obtain the provider node, which violates the Generic PHY API's > encapsulation (the goal is for struct phy to be an opaque pointer). >=20 > Refactor dw_hdmi_rockchip_bind() to perform a manual phandle lookup > on the "hdmi" PHY index within the controller's DT node. This provides > a parallel path to the clock provider's OF node without relying on the > internal structure of the struct phy handle. >=20 > Signed-off-by: Vladimir Oltean > --- > Cc: Sandy Huang > Cc: "Heiko St=C3=BCbner" > Cc: Andy Yan > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Simona Vetter >=20 > v1->v3: none > --- [...] > @@ -588,13 +589,17 @@ static int dw_hdmi_rockchip_bind(struct device *dev= , struct device *master, > return dev_err_probe(hdmi->dev, ret, "failed to get phy\n"); > } > =20 > - if (hdmi->phy) { nit: a comment would be nice here. I.e. hdmi->phy being an opaque pointer so checking hdmi->phy !=3D NULL is not possible. With that being a "goal", I assume that information is not widely spread so this would prevent the next developer trying to change it back to "if (hdmi->phy)" while that handling change trickles down. apart from that: Reviewed-by: Heiko Stueber