Skip to content

Commit 4a01094

Browse files
committed
drm/amdgpu: check ideas about my crashes
1 parent 330a2ef commit 4a01094

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,12 +534,19 @@ int amdgpu_gfx_enable_kcq(struct amdgpu_device *adev)
534534
spin_unlock(&adev->gfx.kiq.ring_lock);
535535
return r;
536536
}
537+
DRM_DEBUG("kiq alloc'd %d\n", kiq->pmf->map_queues_size *
538+
adev->gfx.num_compute_rings +
539+
kiq->pmf->set_resources_size);
540+
DRM_DEBUG("kiq size init: %d\n", kiq_ring->count_dw);
537541

538542
kiq->pmf->kiq_set_resources(kiq_ring, queue_mask);
543+
DRM_DEBUG("kiq size after set_res: %d\n", kiq_ring->count_dw);
539544
for (i = 0; i < adev->gfx.num_compute_rings; i++)
540545
kiq->pmf->kiq_map_queues(kiq_ring, &adev->gfx.compute_ring[i]);
546+
DRM_DEBUG("kiq size after map_q: %d\n", kiq_ring->count_dw);
541547

542548
r = amdgpu_ring_test_helper(kiq_ring);
549+
DRM_DEBUG("kiq size after test: %d\n", kiq_ring->count_dw);
543550
spin_unlock(&adev->gfx.kiq.ring_lock);
544551
if (r)
545552
DRM_ERROR("KCQ enable failed\n");

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ int amdgpu_ring_alloc(struct amdgpu_ring *ring, unsigned ndw)
7070
if (WARN_ON_ONCE(ndw > ring->max_dw))
7171
return -ENOMEM;
7272

73+
/* check we're not allocating too fast */
74+
WARN_ON_ONCE(ring->count_dw);
75+
7376
ring->count_dw = ndw;
7477
ring->wptr_old = ring->wptr;
7578

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,6 +1943,7 @@ static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
19431943
{
19441944
const struct cs_section_def *cs_data;
19451945
int r;
1946+
DRM_DEBUG("gfx_v9_0_rlc_init\n");
19461947

19471948
adev->gfx.rlc.cs_data = gfx9_cs_data;
19481949

0 commit comments

Comments
 (0)