<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Looks good, thanks!</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Reviewed-by: Tomeu Vizoso <<a href="mailto:tomeu.vizoso@collabora.com">tomeu.vizoso@collabora.com</a>></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 30 Oct 2020 at 15:59, Steven Price <<a href="mailto:steven.price@arm.com">steven.price@arm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When unloading the call to pm_runtime_put_sync_suspend() will attempt to<br>
turn the GPU cores off, however panfrost_device_fini() will have turned<br>
the clocks off. This leads to the hardware locking up.<br>
<br>
Instead don't call pm_runtime_put_sync_suspend() and instead simply mark<br>
the device as suspended using pm_runtime_set_suspended(). And also<br>
include this on the error path in panfrost_probe().<br>
<br>
Fixes: aebe8c22a912 ("drm/panfrost: Fix possible suspend in panfrost_remove")<br>
Signed-off-by: Steven Price <<a href="mailto:steven.price@arm.com" target="_blank">steven.price@arm.com</a>><br>
---<br>
drivers/gpu/drm/panfrost/panfrost_drv.c | 5 +++--<br>
1 file changed, 3 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c<br>
index 23513869500c..0ac8ad18fdc6 100644<br>
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c<br>
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c<br>
@@ -627,6 +627,7 @@ static int panfrost_probe(struct platform_device *pdev)<br>
err_out1:<br>
pm_runtime_disable(pfdev->dev);<br>
panfrost_device_fini(pfdev);<br>
+ pm_runtime_set_suspended(pfdev->dev);<br>
err_out0:<br>
drm_dev_put(ddev);<br>
return err;<br>
@@ -641,9 +642,9 @@ static int panfrost_remove(struct platform_device *pdev)<br>
panfrost_gem_shrinker_cleanup(ddev);<br>
<br>
pm_runtime_get_sync(pfdev->dev);<br>
- panfrost_device_fini(pfdev);<br>
- pm_runtime_put_sync_suspend(pfdev->dev);<br>
pm_runtime_disable(pfdev->dev);<br>
+ panfrost_device_fini(pfdev);<br>
+ pm_runtime_set_suspended(pfdev->dev);<br>
<br>
drm_dev_put(ddev);<br>
return 0;<br>
-- <br>
2.20.1<br>
<br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</blockquote></div>