Thread (36 messages) 36 messages, 3 authors, 5d ago

Re: [PATCH v8 phy-next 15/31] drm/rockchip: dw_hdmi: avoid direct dereference of phy->dev.of_node

From: Heiko Stuebner <heiko@sntech.de>
Date: 2026-05-20 14:21:37
Also in: dri-devel, linux-arm-kernel, linux-arm-msm, linux-can, linux-gpio, linux-ide, linux-media, linux-pci, linux-phy, linux-renesas-soc, linux-riscv, linux-rockchip, linux-samsung-soc, linux-scsi, linux-sunxi, linux-tegra, linux-usb, lkml, spacemit

Hi Vladimir,

Am Dienstag, 5. Mai 2026, 12:05:07 Mitteleuropäische Sommerzeit schrieb 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
with a hidden definition, to be interacted with only using API
functions or NULL pointer checks, for the case where optional variants
of phy_get() did not find a PHY).

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.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Heiko Stueber <heiko@sntech.de>
there is now already more stuff depending on this change [0], and
the change itself also is sort of independent of the whole
phy-series. And somehow this series itself sadly hasn't gotten
much review yet.

So would you be ok with me just picking this one patch for the
drm-misc-tree?


Thanks
Heiko

[0] https://lore.kernel.org/dri-devel/20260518193748.2482823-1-jonas@kwiboo.se/ (local)

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help