Skip to content

Commit 20f9d9c

Browse files
AaronDotopsiff
authored andcommitted
drm/amdgpu: Fix RX550 pcie order dislocation.
Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn> Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> (cherry picked from commit 89494b3) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 38b2fd2 commit 20f9d9c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,13 @@ static int amdgpu_ih_fix_loongarch_pcie_order_start(struct amdgpu_ih_ring *ih,
193193
msleep(20);
194194

195195
for (i = rptr; i < wptr; i += 1) {
196-
if (le32_to_cpu(ih->ring[i]) == 0xDEADBEFF)
196+
if (le32_to_cpu(ih->ring[i]) == 0xDEADBEFF && (i % 4) != 3)
197197
goto restart_check;
198198
}
199199

200200
if (rptr > wptr) {
201201
for (i = 0; i < wptr; i += 1) {
202-
if (le32_to_cpu(ih->ring[i]) == 0xDEADBEFF)
202+
if (le32_to_cpu(ih->ring[i]) == 0xDEADBEFF && (i % 4) != 3)
203203
goto restart_check;
204204
}
205205
}
@@ -364,7 +364,8 @@ int amdgpu_ih_process(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih)
364364
old_rptr = adev->irq.ih.rptr;
365365
r = amdgpu_ih_fix_loongarch_pcie_order_start(&adev->irq.ih, old_rptr, wptr, false);
366366
if (r) {
367-
if (old_rptr == ((wptr + 16) & adev->irq.ih.ptr_mask))
367+
if (old_rptr == ((wptr + 16) & adev->irq.ih.ptr_mask) ||
368+
old_rptr == ((wptr + 32) & adev->irq.ih.ptr_mask))
368369
return IRQ_NONE;
369370

370371
atomic_xchg(&adev->irq.cs_lock, 1);

0 commit comments

Comments
 (0)