Skip to content

Commit cfb0282

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/gfx9.4.3: replace BUG_ON() with WARN_ON()
commit 00f4050 upstream. There's no need to crash the kernel for these cases. Reviewed-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 5676593) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2404600 commit cfb0282

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ static void gfx_v9_4_3_wait_reg_mem(struct amdgpu_ring *ring, int eng_sel,
409409
WAIT_REG_MEM_ENGINE(eng_sel)));
410410

411411
if (mem_space)
412-
BUG_ON(addr0 & 0x3); /* Dword align */
412+
WARN_ON(addr0 & 0x3); /* Dword align */
413413
amdgpu_ring_write(ring, addr0);
414414
amdgpu_ring_write(ring, addr1);
415415
amdgpu_ring_write(ring, ref);
@@ -2882,7 +2882,7 @@ static void gfx_v9_4_3_ring_emit_ib_compute(struct amdgpu_ring *ring,
28822882
}
28832883

28842884
amdgpu_ring_write(ring, PACKET3(PACKET3_INDIRECT_BUFFER, 2));
2885-
BUG_ON(ib->gpu_addr & 0x3); /* Dword align */
2885+
WARN_ON(ib->gpu_addr & 0x3); /* Dword align */
28862886
amdgpu_ring_write(ring,
28872887
#ifdef __BIG_ENDIAN
28882888
(2 << 0) |
@@ -2916,9 +2916,9 @@ static void gfx_v9_4_3_ring_emit_fence(struct amdgpu_ring *ring, u64 addr,
29162916
* aligned if only send 32bit data low (discard data high)
29172917
*/
29182918
if (write64bit)
2919-
BUG_ON(addr & 0x7);
2919+
WARN_ON(addr & 0x7);
29202920
else
2921-
BUG_ON(addr & 0x3);
2921+
WARN_ON(addr & 0x3);
29222922
amdgpu_ring_write(ring, lower_32_bits(addr));
29232923
amdgpu_ring_write(ring, upper_32_bits(addr));
29242924
amdgpu_ring_write(ring, lower_32_bits(seq));
@@ -2978,9 +2978,6 @@ static void gfx_v9_4_3_ring_emit_fence_kiq(struct amdgpu_ring *ring, u64 addr,
29782978
{
29792979
struct amdgpu_device *adev = ring->adev;
29802980

2981-
/* we only allocate 32bit for each seq wb address */
2982-
BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
2983-
29842981
/* write fence seq to the "addr" */
29852982
amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
29862983
amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |

0 commit comments

Comments
 (0)