Skip to content

Commit

Permalink
drm/etnaviv: Warn when GPU doesn't idle fast enough
Browse files Browse the repository at this point in the history
If the GPU isn't idle after signalling pm_runtime_mark_last_busy() plus
waiting for the autosuspend delay there's likely something wrong with
the way we check idleness so warn about that.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
  • Loading branch information
Guido Günther authored and Lucas Stach committed Mar 3, 2020
1 parent 1a910c1 commit 78f2bfa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/etnaviv/etnaviv_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1839,8 +1839,11 @@ static int etnaviv_gpu_rpm_suspend(struct device *dev)
mask = gpu->idle_mask & ~(VIVS_HI_IDLE_STATE_FE |
VIVS_HI_IDLE_STATE_MC);
idle = gpu_read(gpu, VIVS_HI_IDLE_STATE) & mask;
if (idle != mask)
if (idle != mask) {
dev_warn_ratelimited(dev, "GPU not yet idle, mask: 0x%08x\n",
idle);
return -EBUSY;
}

return etnaviv_gpu_hw_suspend(gpu);
}
Expand Down

0 comments on commit 78f2bfa

Please sign in to comment.