amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/5] drm/amdgpu: simplify and fix amdgpu_sync_resv
Date: Thu, 30 Jan 2020 17:34:00 -0500	[thread overview]
Message-ID: <84804d63-5f2e-403b-5fb2-9991442f391d@amd.com> (raw)
In-Reply-To: <20200130124940.30380-4-christian.koenig@amd.com>

On 2020-01-30 7:49, Christian König wrote:
> No matter what we always need to sync to moves.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Tested-by: Tom St Denis <tom.stdenis@amd.com>

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 15 +++++++++++----
>   1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> index c124f64e7aae..9f42032676da 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> @@ -232,10 +232,19 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
>   
>   		f = rcu_dereference_protected(flist->shared[i],
>   					      dma_resv_held(resv));
> +
> +		fence_owner = amdgpu_sync_get_owner(f);
> +
> +		/* Always sync to moves, no matter what */
> +		if (fence_owner == AMDGPU_FENCE_OWNER_UNDEFINED) {
> +			r = amdgpu_sync_fence(sync, f, false);
> +			if (r)
> +				break;
> +		}
> +
>   		/* We only want to trigger KFD eviction fences on
>   		 * evict or move jobs. Skip KFD fences otherwise.
>   		 */
> -		fence_owner = amdgpu_sync_get_owner(f);
>   		if (fence_owner == AMDGPU_FENCE_OWNER_KFD &&
>   		    owner != AMDGPU_FENCE_OWNER_UNDEFINED)
>   			continue;
> @@ -265,9 +274,7 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
>   			break;
>   
>   		case AMDGPU_SYNC_EXPLICIT:
> -			if (owner != AMDGPU_FENCE_OWNER_UNDEFINED)
> -				continue;
> -			break;
> +			continue;
>   		}
>   
>   		r = amdgpu_sync_fence(sync, f, false);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-01-30 22:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 12:49 [PATCH 1/5] drm/amdgpu: fix braces in amdgpu_vm_update_ptes Christian König
2020-01-30 12:49 ` [PATCH 2/5] drm/amdgpu: return EINVAL instead of ENOENT in the VM code Christian König
2020-01-30 22:18   ` Felix Kuehling
2020-01-30 12:49 ` [PATCH 3/5] drm/amdgpu: allow higher level PD invalidations Christian König
2020-01-30 22:17   ` Felix Kuehling
2020-01-30 12:49 ` [PATCH 4/5] drm/amdgpu: simplify and fix amdgpu_sync_resv Christian König
2020-01-30 22:34   ` Felix Kuehling [this message]
2020-01-30 12:49 ` [PATCH 5/5] drm/amdgpu: rework synchronization of VM updates v4 Christian König
2020-01-30 22:42   ` Felix Kuehling
2020-01-30 22:11 ` [PATCH 1/5] drm/amdgpu: fix braces in amdgpu_vm_update_ptes Felix Kuehling
2020-01-31 11:58   ` 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=84804d63-5f2e-403b-5fb2-9991442f391d@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).