diff options
author | Philip Yang <Philip.Yang@amd.com> | 2021-12-08 14:55:15 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-12-13 16:32:35 -0500 |
commit | 0771c805918c56b335c8f726e147b19c4f78565b (patch) | |
tree | 286b4d6afd2aad9c8cd58af6b554596415fb7fc6 /drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | |
parent | e105b64a364adb0fd0b780050441eb05468fee33 (diff) | |
download | lwn-0771c805918c56b335c8f726e147b19c4f78565b.tar.gz lwn-0771c805918c56b335c8f726e147b19c4f78565b.zip |
drm/amdgpu: Handle fault with same timestamp
Remove not unique timestamp WARNING as same timestamp interrupt happens
on some chips,
Drain fault need to wait for the processed_timestamp to be truly greater
than the checkpoint or the ring to be empty to be sure no stale faults
are handled.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1818
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c index 8050f7ba93ad..3df146579ad9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c @@ -188,8 +188,8 @@ int amdgpu_ih_wait_on_checkpoint_process_ts(struct amdgpu_device *adev, checkpoint_ts = amdgpu_ih_decode_iv_ts(adev, ih, checkpoint_wptr, -1); return wait_event_interruptible_timeout(ih->wait_process, - !amdgpu_ih_ts_after(ih->processed_timestamp, checkpoint_ts), - timeout); + amdgpu_ih_ts_after(checkpoint_ts, ih->processed_timestamp) || + ih->rptr == amdgpu_ih_get_wptr(adev, ih), timeout); } /** |