Commit a04c696c authored by Akhil P Oommen's avatar Akhil P Oommen Committed by Rob Clark

drm/msm: Implement shutdown callback for adreno

Implement the shutdown callback for adreno gpu platform device
to safely shutdown it before a system reboot. This helps to avoid
futher transactions from gpu after the smmu is moved to bypass mode.
Signed-off-by: default avatarAkhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent ab387647
...@@ -475,6 +475,11 @@ static int adreno_remove(struct platform_device *pdev) ...@@ -475,6 +475,11 @@ static int adreno_remove(struct platform_device *pdev)
return 0; return 0;
} }
static void adreno_shutdown(struct platform_device *pdev)
{
pm_runtime_force_suspend(&pdev->dev);
}
static const struct of_device_id dt_match[] = { static const struct of_device_id dt_match[] = {
{ .compatible = "qcom,adreno" }, { .compatible = "qcom,adreno" },
{ .compatible = "qcom,adreno-3xx" }, { .compatible = "qcom,adreno-3xx" },
...@@ -509,6 +514,7 @@ static const struct dev_pm_ops adreno_pm_ops = { ...@@ -509,6 +514,7 @@ static const struct dev_pm_ops adreno_pm_ops = {
static struct platform_driver adreno_driver = { static struct platform_driver adreno_driver = {
.probe = adreno_probe, .probe = adreno_probe,
.remove = adreno_remove, .remove = adreno_remove,
.shutdown = adreno_shutdown,
.driver = { .driver = {
.name = "adreno", .name = "adreno",
.of_match_table = dt_match, .of_match_table = dt_match,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment