drm/amdgpu: Handle fault with same timestamp
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +2 -2
@@ -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); }/**
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0 -3
@@ -522,9 +522,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; }
Signature · 1 line
2.17.1
Am 2021-12-08 um 3:16 p.m. schrieb Philip Yang:
Quoted 8 lines
Remove not unique timestamp WARNING as same timestamp interrupt happens on some chips,
Drain fault need to wait for the
processed_timestampto be truly greater than the checkpoint or the ring to be empty to be sure no stale faults are handled.Signed-off-by Philip Yang <[email protected]>
Quoted 34 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +2
-2@@ -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); }/** drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0
-3@@ -522,9 +522,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; }
Quoted 9 lines · Philip Yang
Remove not unique timestamp WARNING as same timestamp interrupt happens on some chips,
Drain fault need to wait for the
processed_timestampto be truly greater than the checkpoint or the ring to be empty to be sure no stale faults are handled.Signed-off-by Philip Yang <[email protected]>
Maybe add the link to the bug when you push this?
Alex
Quoted 37 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +2
-2@@ -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); }/** drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0
-4@@ -522,9 +522,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; } --2.17.1
Quoted 6 lines · Alex Deucher
Quoted 4 lines · Philip Yang
Remove not unique timestamp WARNING as same timestamp interrupt happens on some chips,
Quoted 7 lines
Quoted 5 lines
Drain fault need to wait for the
processed_timestampto be truly greater than the checkpoint or the ring to be empty to be sure no stale faults are handled.Signed-off-by Philip Yang <[email protected]>Maybe add the link to the bug when you push this?
Alex
Quoted 40 lines
Alex
Quoted 37 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +2
-2@@ -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); }/** drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0
-4@@ -522,9 +522,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; } --2.17.1
Am 08.12.21 um 21:27 schrieb Alex Deucher:
Quoted 5 lines · Alex Deucher
Quoted 4 lines · Philip Yang
Quoted 3 lines
Remove not unique timestamp WARNING as same timestamp interrupt happens on some chips,
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Drain fault need to wait for the
processed_timestampto be truly greater than the checkpoint or the ring to be empty to be sure no stale faults are handled.Signed-off-by Philip Yang <[email protected]>Maybe add the link to the bug when you push this?
With that done Reviewed-by: Christian König <[email protected]>
Quoted 42 lines
Alex
Quoted 39 lines
Alex
Quoted 37 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +2
-2@@ -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); }/** drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0
-4@@ -522,9 +522,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; } --2.17.1