diff options
author | Trigger Huang <Trigger.Huang@amd.com> | 2018-12-18 09:14:47 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-12-20 12:12:20 -0500 |
commit | 0346bfd9fe5ade369d9f946f82d6a43d113ba493 (patch) | |
tree | 8f278dcbd486043634ba3e21032a6bfea587ca61 /drivers/gpu | |
parent | e01f2d41895102d824c6b8f5e011dd5e286d5e8b (diff) | |
download | linux-stable-0346bfd9fe5ade369d9f946f82d6a43d113ba493.tar.gz linux-stable-0346bfd9fe5ade369d9f946f82d6a43d113ba493.tar.bz2 linux-stable-0346bfd9fe5ade369d9f946f82d6a43d113ba493.zip |
drm/amdgpu: print process info when job timeout
When a job is timeout, try to print the related process information
for debugging
Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c index e0af44fd6a0c..0a17fb1af204 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c @@ -32,6 +32,9 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job) { struct amdgpu_ring *ring = to_amdgpu_ring(s_job->sched); struct amdgpu_job *job = to_amdgpu_job(s_job); + struct amdgpu_task_info ti; + + memset(&ti, 0, sizeof(struct amdgpu_task_info)); if (amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) { DRM_ERROR("ring %s timeout, but soft recovered\n", @@ -39,9 +42,12 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job) return; } + amdgpu_vm_get_task_info(ring->adev, job->pasid, &ti); DRM_ERROR("ring %s timeout, signaled seq=%u, emitted seq=%u\n", job->base.sched->name, atomic_read(&ring->fence_drv.last_seq), ring->fence_drv.sync_seq); + DRM_ERROR("Process information: process %s pid %d thread %s pid %d\n", + ti.process_name, ti.tgid, ti.task_name, ti.pid); if (amdgpu_device_should_recover_gpu(ring->adev)) amdgpu_device_gpu_recover(ring->adev, job); |