mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 14:33:24 -04:00
drm/amdgpu/gfx9.4.3: drop all BUG()s
There's no need to crash the kernel for these cases. Reviewed-by: Kent Russell <kent.russell@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -3040,13 +3040,17 @@ static u64 gfx_v9_4_3_ring_get_rptr_compute(struct amdgpu_ring *ring)
|
||||
|
||||
static u64 gfx_v9_4_3_ring_get_wptr_compute(struct amdgpu_ring *ring)
|
||||
{
|
||||
struct amdgpu_device *adev = ring->adev;
|
||||
u64 wptr;
|
||||
|
||||
/* XXX check if swapping is necessary on BE */
|
||||
if (ring->use_doorbell)
|
||||
if (ring->use_doorbell) {
|
||||
wptr = atomic64_read((atomic64_t *)&ring->adev->wb.wb[ring->wptr_offs]);
|
||||
else
|
||||
BUG();
|
||||
} else {
|
||||
dev_warn_once(adev->dev,
|
||||
"%s requires doorbell!\n", __func__);
|
||||
wptr = 0;
|
||||
}
|
||||
return wptr;
|
||||
}
|
||||
|
||||
@@ -3059,7 +3063,8 @@ static void gfx_v9_4_3_ring_set_wptr_compute(struct amdgpu_ring *ring)
|
||||
atomic64_set((atomic64_t *)&adev->wb.wb[ring->wptr_offs], ring->wptr);
|
||||
WDOORBELL64(ring->doorbell_index, ring->wptr);
|
||||
} else {
|
||||
BUG(); /* only DOORBELL method supported on gfx9 now */
|
||||
dev_warn_once(adev->dev,
|
||||
"%s requires doorbell!\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user