mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
drm/amdgpu/gfx12.1: 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:
parent
836950e322
commit
3c2357bf9e
|
|
@ -891,8 +891,9 @@ static int gfx_v12_1_gpu_early_init(struct amdgpu_device *adev)
|
|||
adev->gfx.config.sc_earlyz_tile_fifo_size = 0x4C0;
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
break;
|
||||
dev_warn(adev->dev, "Unsupported GC version 0x%08x\n",
|
||||
amdgpu_ip_version(adev, GC_HWIP, 0));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -3673,13 +3674,16 @@ static u64 gfx_v12_1_ring_get_rptr_compute(struct amdgpu_ring *ring)
|
|||
|
||||
static u64 gfx_v12_1_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->wptr_cpu_addr);
|
||||
else
|
||||
BUG();
|
||||
} else {
|
||||
dev_warn_once(adev->dev, "%s requires doorbell!\n", __func__);
|
||||
wptr = 0;
|
||||
}
|
||||
return wptr;
|
||||
}
|
||||
|
||||
|
|
@ -3693,7 +3697,7 @@ static void gfx_v12_1_ring_set_wptr_compute(struct amdgpu_ring *ring)
|
|||
ring->wptr);
|
||||
WDOORBELL64(ring->doorbell_index, ring->wptr);
|
||||
} else {
|
||||
BUG(); /* only DOORBELL method supported on gfx12 now */
|
||||
dev_warn_once(adev->dev, "%s requires doorbell!\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user