Skip to content

Commit 11815bb

Browse files
ChristianKoenigAMDalexdeucher
authored andcommitted
drm/amdgpu: partially revert "reduce reset time"
This partially reverts commit 194eb17. This commit introduced a new state variable into adev without even remotely worrying about CPU barriers. Since we already have the amdgpu_in_reset() function exactly for this use case partially revert that. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 26c95e8 commit 11815bb

File tree

5 files changed

+4
-8
lines changed

5 files changed

+4
-8
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,6 @@ struct amdgpu_device {
11751175

11761176
struct work_struct reset_work;
11771177

1178-
bool job_hang;
11791178
bool dc_enabled;
11801179
/* Mask of active clusters */
11811180
uint32_t aid_mask;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ int amdgpu_amdkfd_unmap_hiq(struct amdgpu_device *adev, u32 doorbell_off,
836836
if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
837837
return -EINVAL;
838838

839-
if (!kiq_ring->sched.ready || adev->job_hang)
839+
if (!kiq_ring->sched.ready || amdgpu_in_reset(adev))
840840
return 0;
841841

842842
ring_funcs = kzalloc(sizeof(*ring_funcs), GFP_KERNEL);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ int amdgpu_gfx_disable_kcq(struct amdgpu_device *adev, int xcc_id)
515515
if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
516516
return -EINVAL;
517517

518-
if (!kiq_ring->sched.ready || adev->job_hang || amdgpu_in_reset(adev))
518+
if (!kiq_ring->sched.ready || amdgpu_in_reset(adev))
519519
return 0;
520520

521521
spin_lock(&kiq->ring_lock);
@@ -567,7 +567,7 @@ int amdgpu_gfx_disable_kgq(struct amdgpu_device *adev, int xcc_id)
567567
if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
568568
return -EINVAL;
569569

570-
if (!adev->gfx.kiq[0].ring.sched.ready || adev->job_hang)
570+
if (!adev->gfx.kiq[0].ring.sched.ready || amdgpu_in_reset(adev))
571571
return 0;
572572

573573
if (amdgpu_gfx_is_master_xcc(adev, xcc_id)) {

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
102102
return DRM_GPU_SCHED_STAT_ENODEV;
103103
}
104104

105-
adev->job_hang = true;
106-
107105
/*
108106
* Do the coredump immediately after a job timeout to get a very
109107
* close dump/snapshot/representation of GPU's current error status
@@ -181,7 +179,6 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
181179
}
182180

183181
exit:
184-
adev->job_hang = false;
185182
drm_dev_exit(idx);
186183
return DRM_GPU_SCHED_STAT_NOMINAL;
187184
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5957,7 +5957,7 @@ static int gfx_v10_0_cp_gfx_enable(struct amdgpu_device *adev, bool enable)
59575957
else
59585958
WREG32_SOC15(GC, 0, mmCP_ME_CNTL, tmp);
59595959

5960-
if (adev->job_hang && !enable)
5960+
if (amdgpu_in_reset(adev) && !enable)
59615961
return 0;
59625962

59635963
for (i = 0; i < adev->usec_timeout; i++) {

0 commit comments

Comments
 (0)