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

index f6ecbc524c9b7aced7993b731e6f0a3ba438703e..87c1e29fd298d49acbad1953dd4dd559bba4d75f 100644 (file)
@@ -377,7 +377,7 @@ static void sdma_v5_2_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));
@@ -388,7 +388,7 @@ static void sdma_v5_2_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));