gpu: host1x: Fix boot regression for Tegra
authorJon Hunter <jonathanh@nvidia.com>
Wed, 25 Sep 2024 16:05:04 +0000 (17:05 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 25 Sep 2024 19:21:45 +0000 (21:21 +0200)
commitdc56f8428e5f34418f3243a60cec13166efe4fdb
treef8facd5ef4a2595e397c7b1679e2273fd330e637
parentb4ad4ef374d66cc8df3188bb1ddb65bce5fc9e50
gpu: host1x: Fix boot regression for Tegra

Commit 4c27ac45e622 ("gpu: host1x: Request syncpoint IRQs only during
probe") caused a boot regression for the Tegra186 device. Following this
update the function host1x_intr_init() now calls
host1x_hw_intr_disable_all_syncpt_intrs() during probe. However,
host1x_intr_init() is called before runtime power-management is enabled
for Host1x and the function host1x_hw_intr_disable_all_syncpt_intrs() is
accessing hardware registers. So if the Host1x hardware is not enabled
prior to probing then the device will now hang on attempting to access
the registers. So far this is only observed on Tegra186, but potentially
could be seen on other devices.

Fix this by moving the call to the function host1x_intr_init() in probe
to after enabling the runtime power-management in the probe and update
the failure path in probe as necessary.

Fixes: 4c27ac45e622 ("gpu: host1x: Request syncpoint IRQs only during probe")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240925160504.60221-1-jonathanh@nvidia.com
drivers/gpu/host1x/dev.c