Commit 0771c805 authored by Philip Yang's avatar Philip Yang Committed by Alex Deucher
Browse files

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: default avatarPhilip Yang <Philip.Yang@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e105b64a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}

/**
+0 −3
Original line number Diff line number Diff line
@@ -529,9 +529,6 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev,
	if (!handled)
		amdgpu_amdkfd_interrupt(adev, entry.iv_entry);

	dev_WARN_ONCE(adev->dev, ih->processed_timestamp == entry.timestamp,
		      "IH timestamps are not unique");

	if (amdgpu_ih_ts_after(ih->processed_timestamp, entry.timestamp))
		ih->processed_timestamp = entry.timestamp;
}