Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: partially revert "reduce reset time"

This partially reverts commit 194eb174cbe4fe2b3376ac30acca2dc8c8beca00.

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 <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Christian König and committed by
Alex Deucher
11815bb0 26c95e83

+4 -8
-1
drivers/gpu/drm/amd/amdgpu/amdgpu.h
··· 1175 1175 1176 1176 struct work_struct reset_work; 1177 1177 1178 - bool job_hang; 1179 1178 bool dc_enabled; 1180 1179 /* Mask of active clusters */ 1181 1180 uint32_t aid_mask;
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
··· 836 836 if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues) 837 837 return -EINVAL; 838 838 839 - if (!kiq_ring->sched.ready || adev->job_hang) 839 + if (!kiq_ring->sched.ready || amdgpu_in_reset(adev)) 840 840 return 0; 841 841 842 842 ring_funcs = kzalloc(sizeof(*ring_funcs), GFP_KERNEL);
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
··· 515 515 if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues) 516 516 return -EINVAL; 517 517 518 - if (!kiq_ring->sched.ready || adev->job_hang || amdgpu_in_reset(adev)) 518 + if (!kiq_ring->sched.ready || amdgpu_in_reset(adev)) 519 519 return 0; 520 520 521 521 spin_lock(&kiq->ring_lock); ··· 567 567 if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues) 568 568 return -EINVAL; 569 569 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)) 571 571 return 0; 572 572 573 573 if (amdgpu_gfx_is_master_xcc(adev, xcc_id)) {
-3
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
··· 102 102 return DRM_GPU_SCHED_STAT_ENODEV; 103 103 } 104 104 105 - adev->job_hang = true; 106 - 107 105 /* 108 106 * Do the coredump immediately after a job timeout to get a very 109 107 * close dump/snapshot/representation of GPU's current error status ··· 179 181 } 180 182 181 183 exit: 182 - adev->job_hang = false; 183 184 drm_dev_exit(idx); 184 185 return DRM_GPU_SCHED_STAT_NOMINAL; 185 186 }
+1 -1
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
··· 5957 5957 else 5958 5958 WREG32_SOC15(GC, 0, mmCP_ME_CNTL, tmp); 5959 5959 5960 - if (adev->job_hang && !enable) 5960 + if (amdgpu_in_reset(adev) && !enable) 5961 5961 return 0; 5962 5962 5963 5963 for (i = 0; i < adev->usec_timeout; i++) {