diff options
author | Heiko Stuebner <heiko@sntech.de> | 2025-02-23 01:37:33 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2025-02-27 01:33:15 +0300 |
commit | b20150d499b3ee5c2d632fbc5ac94f98dd33accf (patch) | |
tree | d5b5779ce8e40c561a3010bbb195ef63b68527dd /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |
parent | 2014c95afecee3e76ca4a56956a936e23283f05b (diff) | |
download | linux-b20150d499b3ee5c2d632fbc5ac94f98dd33accf.tar.xz |
clk: check for disabled clock-provider in of_clk_get_hw_from_clkspec()
of_clk_get_hw_from_clkspec() checks all available clock-providers by
comparing their of nodes to the one from the clkspec. If no matching
clock provider is found, the function returns -EPROBE_DEFER to cause a
re-check at a later date. If a matching clock provider is found, an
authoritative answer can be retrieved from it whether the clock exists
or not.
This does not take into account that the clock-provider may never
appear, because it's node is disabled. This can happen when a clock is
optional, provided by a separate block which never gets enabled.
One example of this happening is the rk3588's VOP, which has optional
additional display clocks coming from PLLs inside the hdmiphy blocks.
These can be used for better rates, but the system will also work
without them.
The problem around that is described in the followups to[1]. As we
already know the of node of the presumed clock provider, add a check via
of_device_is_available() whether this is a "valid" device node. This
prevents eternal defer loops.
Link: https://lore.kernel.org/dri-devel/20250215-vop2-hdmi1-disp-modes-v1-3-81962a7151d6@collabora.com/ [1]
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Tested-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250222223733.2990179-1-heiko@sntech.de
[sboyd@kernel.org: Reword commit text a bit]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions