Skip to content

Commit c8347f9

Browse files
jonhunterthierryreding
authored andcommitted
gpu: host1x: Fix boot regression for Tegra
Commit 4c27ac4 ("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: 4c27ac4 ("gpu: host1x: Request syncpoint IRQs only during probe") Signed-off-by: Jon Hunter <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit dc56f84) Signed-off-by: Thierry Reding <[email protected]>
1 parent fcf38bc commit c8347f9

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

drivers/gpu/host1x/dev.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -625,12 +625,6 @@ static int host1x_probe(struct platform_device *pdev)
625625
goto free_contexts;
626626
}
627627

628-
err = host1x_intr_init(host);
629-
if (err) {
630-
dev_err(&pdev->dev, "failed to initialize interrupts\n");
631-
goto deinit_syncpt;
632-
}
633-
634628
pm_runtime_enable(&pdev->dev);
635629

636630
err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev);
@@ -642,6 +636,12 @@ static int host1x_probe(struct platform_device *pdev)
642636
if (err)
643637
goto pm_disable;
644638

639+
err = host1x_intr_init(host);
640+
if (err) {
641+
dev_err(&pdev->dev, "failed to initialize interrupts\n");
642+
goto pm_put;
643+
}
644+
645645
host1x_debug_init(host);
646646

647647
err = host1x_register(host);
@@ -658,13 +658,11 @@ static int host1x_probe(struct platform_device *pdev)
658658
host1x_unregister(host);
659659
deinit_debugfs:
660660
host1x_debug_deinit(host);
661-
661+
host1x_intr_deinit(host);
662+
pm_put:
662663
pm_runtime_put_sync_suspend(&pdev->dev);
663664
pm_disable:
664665
pm_runtime_disable(&pdev->dev);
665-
666-
host1x_intr_deinit(host);
667-
deinit_syncpt:
668666
host1x_syncpt_deinit(host);
669667
free_contexts:
670668
host1x_memory_context_list_free(&host->context_list);

0 commit comments

Comments
 (0)