All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
To: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 2/4] drm/amdgpu:use job* to replace voluntary
Date: Mon, 8 May 2017 11:08:45 +0200	[thread overview]
Message-ID: <a76826b4-54d0-52d2-8015-d0c64ee3f86b@vodafone.de> (raw)
In-Reply-To: <1494226269-8837-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>

Am 08.05.2017 um 08:51 schrieb Monk Liu:
> that way we can know which job cause hang and
> can do per sched reset/recovery instead of all
> sched.
>
> Change-Id: Ifc98cd74b2d93823c489de6a89087ba188957eff
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>

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

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++----
>   drivers/gpu/drm/amd/amdgpu/amdgpu_job.c    | 2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h   | 2 +-
>   drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c      | 2 +-
>   drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c      | 2 +-
>   5 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 4985a7e..0e5f314 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2529,14 +2529,13 @@ static int amdgpu_recover_vram_from_shadow(struct amdgpu_device *adev,
>    * amdgpu_sriov_gpu_reset - reset the asic
>    *
>    * @adev: amdgpu device pointer
> - * @voluntary: if this reset is requested by guest.
> - *             (true means by guest and false means by HYPERVISOR )
> + * @job: which job trigger hang
>    *
>    * Attempt the reset the GPU if it has hung (all asics).
>    * for SRIOV case.
>    * Returns 0 for success or an error on failure.
>    */
> -int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, bool voluntary)
> +int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, struct amdgpu_job *job)
>   {
>   	int i, r = 0;
>   	int resched;
> @@ -2566,7 +2565,7 @@ int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, bool voluntary)
>   	amdgpu_fence_driver_force_completion(adev);
>   
>   	/* request to take full control of GPU before re-initialization  */
> -	if (voluntary)
> +	if (job)
>   		amdgpu_virt_reset_gpu(adev);
>   	else
>   		amdgpu_virt_request_full_gpu(adev, true);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> index c7718af..3c6fb6e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> @@ -38,7 +38,7 @@ static void amdgpu_job_timedout(struct amd_sched_job *s_job)
>   		  job->ring->fence_drv.sync_seq);
>   
>   	if (amdgpu_sriov_vf(job->adev))
> -		amdgpu_sriov_gpu_reset(job->adev, true);
> +		amdgpu_sriov_gpu_reset(job->adev, job);
>   	else
>   		amdgpu_gpu_reset(job->adev);
>   }
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
> index 6f2b7df..9e1062e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
> @@ -96,7 +96,7 @@ void amdgpu_virt_kiq_wreg(struct amdgpu_device *adev, uint32_t reg, uint32_t v);
>   int amdgpu_virt_request_full_gpu(struct amdgpu_device *adev, bool init);
>   int amdgpu_virt_release_full_gpu(struct amdgpu_device *adev, bool init);
>   int amdgpu_virt_reset_gpu(struct amdgpu_device *adev);
> -int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, bool voluntary);
> +int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, struct amdgpu_job *job);
>   int amdgpu_virt_alloc_mm_table(struct amdgpu_device *adev);
>   void amdgpu_virt_free_mm_table(struct amdgpu_device *adev);
>   
> diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
> index 96139ec..69da52d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
> @@ -243,7 +243,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
>   	}
>   
>   	/* Trigger recovery due to world switch failure */
> -	amdgpu_sriov_gpu_reset(adev, false);
> +	amdgpu_sriov_gpu_reset(adev, NULL);
>   }
>   
>   static int xgpu_ai_set_mailbox_rcv_irq(struct amdgpu_device *adev,
> diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
> index f0d64f1..1cdf5cc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c
> @@ -514,7 +514,7 @@ static void xgpu_vi_mailbox_flr_work(struct work_struct *work)
>   	}
>   
>   	/* Trigger recovery due to world switch failure */
> -	amdgpu_sriov_gpu_reset(adev, false);
> +	amdgpu_sriov_gpu_reset(adev, NULL);
>   }
>   
>   static int xgpu_vi_set_mailbox_rcv_irq(struct amdgpu_device *adev,


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-05-08  9:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08  6:51 [PATCH 0/4] TDR guilty job feature Monk Liu
     [not found] ` <1494226269-8837-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-05-08  6:51   ` [PATCH 1/4] drm/amdgpu:don't invoke srio-gpu-reset in gpu-reset Monk Liu
     [not found]     ` <1494226269-8837-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-05-08  9:07       ` Christian König
     [not found]         ` <4d4fb987-9ccb-8fde-e485-7586f6ec49e8-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-05-08  9:10           ` Liu, Monk
     [not found]             ` <DM5PR12MB16103A41862C9FCFF923295384EE0-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-05-08  9:19               ` Christian König
     [not found]                 ` <707273ff-6cf7-4d86-bbe4-7cebe928840d-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-05-08  9:24                   ` Liu, Monk
     [not found]                     ` <DM5PR12MB1610A94BDEBFCAB42975560B84EE0-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-05-08  9:33                       ` Christian König
     [not found]                         ` <3290f7e0-56a7-98e0-db60-0ce968cd65e5-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-05-08  9:42                           ` Liu, Monk
     [not found]                             ` <DM5PR12MB1610851C6F0BDD8FAC54DE1284EE0-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-05-08  9:50                               ` Christian König
2017-05-08  6:51   ` [PATCH 2/4] drm/amdgpu:use job* to replace voluntary Monk Liu
     [not found]     ` <1494226269-8837-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-05-08  9:08       ` Christian König [this message]
2017-05-08  6:51   ` [PATCH 3/4] drm/amdgpu:only call flr_work under infinite timeout Monk Liu
     [not found]     ` <1494226269-8837-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-05-08  9:11       ` Christian König
     [not found]         ` <7ae97dfa-96bd-414b-0ace-ddf4e626440d-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-05-08  9:15           ` Liu, Monk
2017-05-08  6:51   ` [PATCH 4/4] drm/amdgpu/SRIOV:implement guilty job TDR for Monk Liu
     [not found]     ` <1494226269-8837-5-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-05-08  7:00       ` Liu, Monk

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=a76826b4-54d0-52d2-8015-d0c64ee3f86b@vodafone.de \
    --to=deathsimple-antagkrnahcb1svskn2v4q@public.gmane.org \
    --cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.