There's no need to crash the kernel for these cases.

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 47721d0c37812..570dc90c187ec 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -1183,7 +1183,7 @@ static void gfx_v9_0_wait_reg_mem(struct amdgpu_ring 
*ring, int eng_sel,
                                 WAIT_REG_MEM_ENGINE(eng_sel)));
 
        if (mem_space)
-               BUG_ON(addr0 & 0x3); /* Dword align */
+               WARN_ON(addr0 & 0x3); /* Dword align */
        amdgpu_ring_write(ring, addr0);
        amdgpu_ring_write(ring, addr1);
        amdgpu_ring_write(ring, ref);
@@ -5435,7 +5435,7 @@ static void gfx_v9_0_ring_emit_ib_gfx(struct amdgpu_ring 
*ring,
        }
 
        amdgpu_ring_write(ring, header);
-       BUG_ON(ib->gpu_addr & 0x3); /* Dword align */
+       WARN_ON(ib->gpu_addr & 0x3); /* Dword align */
        amdgpu_ring_write(ring,
 #ifdef __BIG_ENDIAN
                (2 << 0) |
@@ -5531,7 +5531,7 @@ static void gfx_v9_0_ring_emit_ib_compute(struct 
amdgpu_ring *ring,
        }
 
        amdgpu_ring_write(ring, PACKET3(PACKET3_INDIRECT_BUFFER, 2));
-       BUG_ON(ib->gpu_addr & 0x3); /* Dword align */
+       WARN_ON(ib->gpu_addr & 0x3); /* Dword align */
        amdgpu_ring_write(ring,
 #ifdef __BIG_ENDIAN
                                (2 << 0) |
@@ -5572,9 +5572,9 @@ static void gfx_v9_0_ring_emit_fence(struct amdgpu_ring 
*ring, u64 addr,
         * aligned if only send 32bit data low (discard data high)
         */
        if (write64bit)
-               BUG_ON(addr & 0x7);
+               WARN_ON(addr & 0x7);
        else
-               BUG_ON(addr & 0x3);
+               WARN_ON(addr & 0x3);
        amdgpu_ring_write(ring, lower_32_bits(addr));
        amdgpu_ring_write(ring, upper_32_bits(addr));
        amdgpu_ring_write(ring, lower_32_bits(seq));
-- 
2.54.0

Reply via email to