]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/sdma5.0: replace BUG_ON() with WARN_ON()
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Jun 2026 22:26:28 +0000 (18:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2026 16:58:03 +0000 (12:58 -0400)
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 8d144a0eb09537055841af48c9e7c2d4cd48e84d)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c

index fa02907217e08f4075eb8777a16105be65e0c166..b809942b1eb798b140eb935d7de65674e7adf358 100644 (file)
@@ -527,7 +527,7 @@ static void sdma_v5_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se
        amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_FENCE) |
                          SDMA_PKT_FENCE_HEADER_MTYPE(0x3)); /* Ucached(UC) */
        /* zero in first two bits */
-       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));
@@ -538,7 +538,7 @@ static void sdma_v5_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 se
                amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_FENCE) |
                                  SDMA_PKT_FENCE_HEADER_MTYPE(0x3));
                /* zero in first two bits */
-               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, upper_32_bits(seq));