Skip to content

Commit 81db370

Browse files
ChristianKoenigAMDalexdeucher
authored andcommitted
drm/amdgpu: stop touching sched.ready in the backend
This unfortunately comes up in regular intervals and breaks GPU reset for the engine in question. The sched.ready flag controls if an engine can't get working during hw_init, but should never be set to false during hw_fini. v2: squash in unused variable fix (Alex) Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6e8bcdd commit 81db370

File tree

4 files changed

+1
-16
lines changed

4 files changed

+1
-16
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,6 @@ static int jpeg_v2_5_hw_fini(void *handle)
198198
if (adev->jpeg.cur_state != AMD_PG_STATE_GATE &&
199199
RREG32_SOC15(JPEG, i, mmUVD_JRBC_STATUS))
200200
jpeg_v2_5_set_powergating_state(adev, AMD_PG_STATE_GATE);
201-
202-
ring->sched.ready = false;
203201
}
204202

205203
return 0;

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@ static int jpeg_v3_0_hw_fini(void *handle)
166166
RREG32_SOC15(JPEG, 0, mmUVD_JRBC_STATUS))
167167
jpeg_v3_0_set_powergating_state(adev, AMD_PG_STATE_GATE);
168168

169-
ring->sched.ready = false;
170-
171169
return 0;
172170
}
173171

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -502,11 +502,6 @@ static void sdma_v5_2_gfx_stop(struct amdgpu_device *adev)
502502
ib_cntl = REG_SET_FIELD(ib_cntl, SDMA0_GFX_IB_CNTL, IB_ENABLE, 0);
503503
WREG32(sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_GFX_IB_CNTL), ib_cntl);
504504
}
505-
506-
sdma0->sched.ready = false;
507-
sdma1->sched.ready = false;
508-
sdma2->sched.ready = false;
509-
sdma3->sched.ready = false;
510505
}
511506

512507
/**

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ static int vcn_v3_0_hw_fini(void *handle)
381381
{
382382
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
383383
struct amdgpu_ring *ring;
384-
int i, j;
384+
int i;
385385

386386
for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
387387
if (adev->vcn.harvest_config & (1 << i))
@@ -396,12 +396,6 @@ static int vcn_v3_0_hw_fini(void *handle)
396396
vcn_v3_0_set_powergating_state(adev, AMD_PG_STATE_GATE);
397397
}
398398
}
399-
ring->sched.ready = false;
400-
401-
for (j = 0; j < adev->vcn.num_enc_rings; ++j) {
402-
ring = &adev->vcn.inst[i].ring_enc[j];
403-
ring->sched.ready = false;
404-
}
405399
}
406400

407401
return 0;

0 commit comments

Comments
 (0)