All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
To: "Zhou,
	David(ChunMing)" <David1.Zhou-5C7GfCeVMHo@public.gmane.org>,
	"Liu, Monk" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 03/21] drm/amdgpu:fix scheduler hw reset&recovery
Date: Mon, 6 Feb 2017 09:17:54 +0100	[thread overview]
Message-ID: <68f2819b-2be2-26ef-cba5-8a605a9822fe@vodafone.de> (raw)
In-Reply-To: <MWHPR1201MB02068DCB820D27AFD4F9FEB1B4400-3iK1xFAIwjrUF/YbdlDdgWrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>

Am 06.02.2017 um 04:18 schrieb Zhou, David(ChunMing):
> I'm curious what problem this patch fix? Any crash?
>
> My impression list_for will check if the list is empty, am I wrong?

Yeah, I agree as well. list_for won't do anything if the list is empty.

So this patch doesn't has any effect as far as I can see.

Regards,
Christian.

>
> Regards,
> David Zhou
>
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Monk Liu
> Sent: Saturday, February 04, 2017 6:22 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Monk <Monk.Liu@amd.com>
> Subject: [PATCH 03/21] drm/amdgpu:fix scheduler hw reset&recovery
>
> Change-Id: I39e0b77029d22dc3fb37e2f19da699647ae96aad
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> ---
>   drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> index ffe1f85..73dd5a7 100644
> --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> @@ -384,6 +384,13 @@ void amd_sched_hw_job_reset(struct amd_gpu_scheduler *sched)
>   	struct amd_sched_job *s_job;
>   
>   	spin_lock(&sched->job_list_lock);
> +	s_job = list_first_entry_or_null(&sched->ring_mirror_list,
> +					 struct amd_sched_job, node);
> +	if (!s_job) {
> +		spin_unlock(&sched->job_list_lock);
> +		return;
> +	}
> +
>   	list_for_each_entry_reverse(s_job, &sched->ring_mirror_list, node) {
>   		if (fence_remove_callback(s_job->s_fence->parent, &s_job->s_fence->cb)) {
>   			fence_put(s_job->s_fence->parent);
> @@ -405,6 +412,11 @@ void amd_sched_job_recovery(struct amd_gpu_scheduler *sched)
>   	if (s_job && sched->timeout != MAX_SCHEDULE_TIMEOUT)
>   		schedule_delayed_work(&s_job->work_tdr, sched->timeout);
>   
> +	if (!s_job) {
> +		spin_unlock(&sched->job_list_lock);
> +		return;
> +	}
> +
>   	list_for_each_entry_safe(s_job, tmp, &sched->ring_mirror_list, node) {
>   		struct amd_sched_fence *s_fence = s_job->s_fence;
>   		struct fence *fence;


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

  parent reply	other threads:[~2017-02-06  8:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-04 10:21 [PATCH 01/21] drm/amdgpu:fix typo Monk Liu
     [not found] ` <1486203702-1116-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-04 10:21   ` [PATCH 02/21] drm/amdgpu:fix golden init for sriov Monk Liu
     [not found]     ` <1486203702-1116-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-06  2:35       ` Yu, Xiangliang
     [not found]         ` <CY4PR12MB1701CFCB8B21A55E220404F9EB400-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-06  2:37           ` 答复: " Liu, Monk
     [not found]             ` <DM5PR12MB1610CA0FD4ACDDE8F059173884400-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-06  2:53               ` Liu, Monk
2017-02-04 10:21   ` [PATCH 03/21] drm/amdgpu:fix scheduler hw reset&recovery Monk Liu
     [not found]     ` <1486203702-1116-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-06  3:18       ` Zhou, David(ChunMing)
     [not found]         ` <MWHPR1201MB02068DCB820D27AFD4F9FEB1B4400-3iK1xFAIwjrUF/YbdlDdgWrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-02-06  8:17           ` Christian König [this message]
     [not found]             ` <68f2819b-2be2-26ef-cba5-8a605a9822fe-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-02-06 15:07               ` Liu, Monk
2017-02-04 10:21   ` [PATCH 04/21] drm/amdgpu:fix powerplay logic Monk Liu
     [not found]     ` <1486203702-1116-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-06 12:31       ` Zhu, Rex
     [not found]         ` <MWHPR12MB1694FE04FC1F52557F8B80F8FB400-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-06 14:18           ` Liu, Monk
2017-02-06  8:14   ` [PATCH 01/21] drm/amdgpu:fix typo Christian König

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=68f2819b-2be2-26ef-cba5-8a605a9822fe@vodafone.de \
    --to=deathsimple-antagkrnahcb1svskn2v4q@public.gmane.org \
    --cc=David1.Zhou-5C7GfCeVMHo@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.