]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/tegra: sor: Initialize runtime PM before use
authorThierry Reding <treding@nvidia.com>
Fri, 31 Jan 2020 16:59:10 +0000 (17:59 +0100)
committerThierry Reding <treding@nvidia.com>
Fri, 31 Jan 2020 20:29:24 +0000 (21:29 +0100)
commitc472a0b0a1fd1688157b4ad6efc1c3fb8e571a53
treed25c3d7f8d99c40b120a160d5b621128f88e23e1
parentad2139cb80a7a9afbfe428d0448d351a84e22ee6
drm/tegra: sor: Initialize runtime PM before use

Commit fd67e9c6ed5a ("drm/tegra: Do not implement runtime PM") replaced
the generic runtime PM usage by a host1x bus-specific implementation in
order to work around some assumptions baked into runtime PM that are in
conflict with the requirements in the Tegra DRM driver.

Unfortunately the new runtime PM callbacks are not setup yet at the time
when the SOR driver first needs to resume the device to register the SOR
pad clock, and accesses to register will cause the system to hang.

Note that this only happens on Tegra124 and Tegra210 because those are
the only SoCs where the SOR pad clock is registered from the SOR driver.
Later generations use a SOR pad clock provided by the BPMP.

Fix this by moving the registration of the SOR pad clock after the
host1x client has been registered. That's somewhat suboptimal because
this could potentially, though it's very unlikely, cause the Tegra DRM
to be probed if the SOR happens to be the last subdevice to register,
only to be immediately removed again if the SOR pad output clock fails
to register. That's just a minor annoyance, though, and doesn't justify
implementing a workaround.

Fixes: fd67e9c6ed5a ("drm/tegra: Do not implement runtime PM")
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/sor.c