Skip to content

Commit 7d570f5

Browse files
committed
drm/amdgpu/job: Replace DRM_INFO/ERROR logging
Use the dev_info/err variants so we get per device logging in multi-GPU cases. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 948f282 commit 7d570f5

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
4141
int r;
4242

4343
if (!drm_dev_enter(adev_to_drm(adev), &idx)) {
44-
DRM_INFO("%s - device unplugged skipping recovery on scheduler:%s",
44+
dev_info(adev->dev, "%s - device unplugged skipping recovery on scheduler:%s",
4545
__func__, s_job->sched->name);
4646

4747
/* Effectively the job is aborted as the device is gone */
@@ -53,19 +53,20 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
5353

5454
if (amdgpu_gpu_recovery &&
5555
amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
56-
DRM_ERROR("ring %s timeout, but soft recovered\n",
57-
s_job->sched->name);
56+
dev_err(adev->dev, "ring %s timeout, but soft recovered\n",
57+
s_job->sched->name);
5858
goto exit;
5959
}
6060

61-
DRM_ERROR("ring %s timeout, signaled seq=%u, emitted seq=%u\n",
62-
job->base.sched->name, atomic_read(&ring->fence_drv.last_seq),
63-
ring->fence_drv.sync_seq);
61+
dev_err(adev->dev, "ring %s timeout, signaled seq=%u, emitted seq=%u\n",
62+
job->base.sched->name, atomic_read(&ring->fence_drv.last_seq),
63+
ring->fence_drv.sync_seq);
6464

6565
ti = amdgpu_vm_get_task_info_pasid(ring->adev, job->pasid);
6666
if (ti) {
67-
DRM_ERROR("Process information: process %s pid %d thread %s pid %d\n",
68-
ti->process_name, ti->tgid, ti->task_name, ti->pid);
67+
dev_err(adev->dev,
68+
"Process information: process %s pid %d thread %s pid %d\n",
69+
ti->process_name, ti->tgid, ti->task_name, ti->pid);
6970
amdgpu_vm_put_task_info(ti);
7071
}
7172

@@ -82,7 +83,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
8283

8384
r = amdgpu_device_gpu_recover(ring->adev, job, &reset_context);
8485
if (r)
85-
DRM_ERROR("GPU Recovery Failed: %d\n", r);
86+
dev_err(adev->dev, "GPU Recovery Failed: %d\n", r);
8687
} else {
8788
drm_sched_suspend_timeout(&ring->sched);
8889
if (amdgpu_sriov_vf(adev))
@@ -274,7 +275,7 @@ amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
274275
while (!fence && job->vm && !job->vmid) {
275276
r = amdgpu_vmid_grab(job->vm, ring, job, &fence);
276277
if (r) {
277-
DRM_ERROR("Error getting VM ID (%d)\n", r);
278+
dev_err(ring->adev->dev, "Error getting VM ID (%d)\n", r);
278279
goto error;
279280
}
280281
}

0 commit comments

Comments
 (0)