All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: Chunming Zhou <David1.Zhou-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 3/4] drm/amdgpu: id reset count only is updated when used end
Date: Wed, 10 May 2017 16:14:19 +0800	[thread overview]
Message-ID: <5912CBDB.9050405@amd.com> (raw)
In-Reply-To: <1494401509-7198-3-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>

Could you elaborate the reason? bug fix, or sth else?

Jerry

On 05/10/2017 03:31 PM, Chunming Zhou wrote:
> before that, we have function to check if reset happens by using reset count.
>
> Change-Id: I2e941dd35295d4210d57a9593d39b5ee9021be9f
> Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 58cde30..bbb3587 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -450,7 +450,6 @@ static int amdgpu_vm_grab_reserved_vmid_locked(struct amdgpu_vm *vm,
>   		id->flushed_updates = fence_get(updates);
>   	}
>   	id->pd_gpu_addr = job->vm_pd_addr;
> -	id->current_gpu_reset_count = atomic_read(&adev->gpu_reset_counter);
>   	atomic64_set(&id->owner, vm->client_id);
>   	job->vm_needs_flush = needs_flush;
>   	if (needs_flush) {
> @@ -598,7 +597,6 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
>   	id->pd_gpu_addr = job->vm_pd_addr;
>   	fence_put(id->flushed_updates);
>   	id->flushed_updates = fence_get(updates);
> -	id->current_gpu_reset_count = atomic_read(&adev->gpu_reset_counter);
>   	atomic64_set(&id->owner, vm->client_id);
>
>   needs_flush:
> @@ -783,6 +781,8 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job)
>   		mutex_lock(&id_mgr->lock);
>   		fence_put(id->last_flush);
>   		id->last_flush = fence;
> +		if (amdgpu_vm_had_gpu_reset(adev, id))
> +			id->current_gpu_reset_count = atomic_read(&adev->gpu_reset_counter);
>   		mutex_unlock(&id_mgr->lock);
>   	}
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-05-10  8:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10  7:31 [PATCH 1/4] drm/amdgpu: add sched sync for amdgpu job Chunming Zhou
     [not found] ` <1494401509-7198-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-05-10  7:31   ` [PATCH 2/4] drm/amdgpu: make pipeline sync be in same place Chunming Zhou
     [not found]     ` <1494401509-7198-2-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-05-10  8:08       ` Zhang, Jerry (Junwei)
2017-05-10  8:28       ` Christian König
2017-05-10  7:31   ` [PATCH 3/4] drm/amdgpu: id reset count only is updated when used end Chunming Zhou
     [not found]     ` <1494401509-7198-3-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-05-10  8:14       ` Zhang, Jerry (Junwei) [this message]
2017-05-10  8:20       ` Christian König
2017-05-10  7:31   ` [PATCH 4/4] drm/amdgpu: check whether the vmid can be reused first Chunming Zhou
     [not found]     ` <1494401509-7198-4-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-05-10  8:11       ` Zhang, Jerry (Junwei)
2017-05-10  8:18       ` Christian König
2017-05-10  8:00   ` [PATCH 1/4] drm/amdgpu: add sched sync for amdgpu job Zhang, Jerry (Junwei)
2017-05-10  8:26   ` Christian König
     [not found]     ` <6c8f4299-d251-a0fe-c76f-b9124482fa0a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-05-10  8:38       ` zhoucm1
     [not found]         ` <5912D18F.8050204-5C7GfCeVMHo@public.gmane.org>
2017-05-10  8:50           ` Christian König
     [not found]             ` <7769dbea-68ad-e6a0-81be-f4e07677c731-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-05-10  9:00               ` zhoucm1
     [not found]                 ` <5912D6BB.2080303-5C7GfCeVMHo@public.gmane.org>
2017-05-10  9:21                   ` Christian König
     [not found]                     ` <ab63e653-6eb3-c42f-1674-ac26528fd202-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-05-10  9:20                       ` zhoucm1
     [not found]                         ` <5912DB4F.7080607-5C7GfCeVMHo@public.gmane.org>
2017-05-10  9:44                           ` 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=5912CBDB.9050405@amd.com \
    --to=jerry.zhang-5c7gfcevmho@public.gmane.org \
    --cc=David1.Zhou-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.