Skip to content

Commit

Permalink
drm/panfrost: Increase the AS_ACTIVE polling timeout
Browse files Browse the repository at this point in the history
Experience has shown that 1ms is sometimes not enough, even when the GPU
is running at its maximum frequency, not to mention that an MMU operation
might take longer if the GPU is running at a lower frequency, which is
likely to be the case if devfreq is active.

Let's pick a significantly bigger timeout value (1ms -> 100ms) to be on
the safe side.

v5:
* New patch

Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Steven Price <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
bbrezillon committed Jul 1, 2021
1 parent 030761e commit 0ec187f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/panfrost/panfrost_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static int wait_ready(struct panfrost_device *pfdev, u32 as_nr)
/* Wait for the MMU status to indicate there is no active command, in
* case one is pending. */
ret = readl_relaxed_poll_timeout_atomic(pfdev->iomem + AS_STATUS(as_nr),
val, !(val & AS_STATUS_AS_ACTIVE), 10, 1000);
val, !(val & AS_STATUS_AS_ACTIVE), 10, 100000);

if (ret) {
/* The GPU hung, let's trigger a reset */
Expand Down

0 comments on commit 0ec187f

Please sign in to comment.