AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu/job: Replace DRM_INFO/ERROR logging
Date: Tue, 9 Jul 2024 11:22:38 +0200	[thread overview]
Message-ID: <b8cb720a-5eeb-4d87-bffc-33f48ecd9ca3@gmail.com> (raw)
In-Reply-To: <20240708190419.3615363-1-alexander.deucher@amd.com>

Am 08.07.24 um 21:04 schrieb Alex Deucher:
> Use the dev_info/err variants so we get per device logging
> in multi-GPU cases.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 21 +++++++++++----------
>   1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> index cf0c4470ab9c..e238f2832f65 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> @@ -41,7 +41,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
>   	int r;
>   
>   	if (!drm_dev_enter(adev_to_drm(adev), &idx)) {
> -		DRM_INFO("%s - device unplugged skipping recovery on scheduler:%s",
> +		dev_info(adev->dev, "%s - device unplugged skipping recovery on scheduler:%s",
>   			 __func__, s_job->sched->name);
>   
>   		/* 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)
>   
>   	if (amdgpu_gpu_recovery &&
>   	    amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
> -		DRM_ERROR("ring %s timeout, but soft recovered\n",
> -			  s_job->sched->name);
> +		dev_err(adev->dev, "ring %s timeout, but soft recovered\n",
> +			s_job->sched->name);
>   		goto exit;
>   	}
>   
> -	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);
> +	dev_err(adev->dev, "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);
>   
>   	ti = amdgpu_vm_get_task_info_pasid(ring->adev, job->pasid);
>   	if (ti) {
> -		DRM_ERROR("Process information: process %s pid %d thread %s pid %d\n",
> -			  ti->process_name, ti->tgid, ti->task_name, ti->pid);
> +		dev_err(adev->dev,
> +			"Process information: process %s pid %d thread %s pid %d\n",
> +			ti->process_name, ti->tgid, ti->task_name, ti->pid);
>   		amdgpu_vm_put_task_info(ti);
>   	}
>   
> @@ -82,7 +83,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
>   
>   		r = amdgpu_device_gpu_recover(ring->adev, job, &reset_context);
>   		if (r)
> -			DRM_ERROR("GPU Recovery Failed: %d\n", r);
> +			dev_err(adev->dev, "GPU Recovery Failed: %d\n", r);
>   	} else {
>   		drm_sched_suspend_timeout(&ring->sched);
>   		if (amdgpu_sriov_vf(adev))
> @@ -274,7 +275,7 @@ amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
>   	while (!fence && job->vm && !job->vmid) {
>   		r = amdgpu_vmid_grab(job->vm, ring, job, &fence);
>   		if (r) {
> -			DRM_ERROR("Error getting VM ID (%d)\n", r);
> +			dev_err(ring->adev->dev, "Error getting VM ID (%d)\n", r);
>   			goto error;
>   		}
>   	}


      reply	other threads:[~2024-07-09  9:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08 19:04 [PATCH] drm/amdgpu/job: Replace DRM_INFO/ERROR logging Alex Deucher
2024-07-09  9:22 ` Christian König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8cb720a-5eeb-4d87-bffc-33f48ecd9ca3@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox