Skip to content

Commit 793cdf1

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/gfx10: replace BUG_ON() with WARN_ON()
commit d06c417 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 ac6f00b) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ff4fc24 commit 793cdf1

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3755,7 +3755,7 @@ static void gfx_v10_0_wait_reg_mem(struct amdgpu_ring *ring, int eng_sel,
37553755
WAIT_REG_MEM_ENGINE(eng_sel)));
37563756

37573757
if (mem_space)
3758-
BUG_ON(addr0 & 0x3); /* Dword align */
3758+
WARN_ON(addr0 & 0x3); /* Dword align */
37593759
amdgpu_ring_write(ring, addr0);
37603760
amdgpu_ring_write(ring, addr1);
37613761
amdgpu_ring_write(ring, ref);
@@ -8311,7 +8311,7 @@ static void gfx_v10_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
83118311
control |= 0x400000;
83128312

83138313
amdgpu_ring_write(ring, header);
8314-
BUG_ON(ib->gpu_addr & 0x3); /* Dword align */
8314+
WARN_ON(ib->gpu_addr & 0x3); /* Dword align */
83158315
amdgpu_ring_write(ring,
83168316
#ifdef __BIG_ENDIAN
83178317
(2 << 0) |
@@ -8350,7 +8350,7 @@ static void gfx_v10_0_ring_emit_ib_compute(struct amdgpu_ring *ring,
83508350
}
83518351

83528352
amdgpu_ring_write(ring, PACKET3(PACKET3_INDIRECT_BUFFER, 2));
8353-
BUG_ON(ib->gpu_addr & 0x3); /* Dword align */
8353+
WARN_ON(ib->gpu_addr & 0x3); /* Dword align */
83548354
amdgpu_ring_write(ring,
83558355
#ifdef __BIG_ENDIAN
83568356
(2 << 0) |
@@ -8383,9 +8383,9 @@ static void gfx_v10_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr,
83838383
* aligned if only send 32bit data low (discard data high)
83848384
*/
83858385
if (write64bit)
8386-
BUG_ON(addr & 0x7);
8386+
WARN_ON(addr & 0x7);
83878387
else
8388-
BUG_ON(addr & 0x3);
8388+
WARN_ON(addr & 0x3);
83898389
amdgpu_ring_write(ring, lower_32_bits(addr));
83908390
amdgpu_ring_write(ring, upper_32_bits(addr));
83918391
amdgpu_ring_write(ring, lower_32_bits(seq));
@@ -8437,9 +8437,6 @@ static void gfx_v10_0_ring_emit_fence_kiq(struct amdgpu_ring *ring, u64 addr,
84378437
{
84388438
struct amdgpu_device *adev = ring->adev;
84398439

8440-
/* we only allocate 32bit for each seq wb address */
8441-
BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
8442-
84438440
/* write fence seq to the "addr" */
84448441
amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
84458442
amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |

0 commit comments

Comments
 (0)