AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Luben Tuikov <luben.tuikov@amd.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Cc: "Christian König" <christian.koenig@amd.com>, stable@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/amdgpu: use DRM_SCHED_FENCE_DONT_PIPELINE for VM updates
Date: Mon, 17 Oct 2022 01:29:29 -0400	[thread overview]
Message-ID: <fd55eef9-1ce1-3f4c-d6ff-a5a230828b8e@amd.com> (raw)
In-Reply-To: <20221014081553.114899-2-christian.koenig@amd.com>

Hi Christian,

On 2022-10-14 04:15, Christian König wrote:
> Make sure that we always have a CPU round trip to let the submission
> code correctly decide if a TLB flush is necessary or not.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>
> CC: stable@vger.kernel.org # 5.19+
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
> index 2b0669c464f6..69e105fa41f6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
> @@ -116,8 +116,15 @@ static int amdgpu_vm_sdma_commit(struct amdgpu_vm_update_params *p,
>  				   DMA_RESV_USAGE_BOOKKEEP);
>  	}
>  
> -	if (fence && !p->immediate)
> +	if (fence && !p->immediate) {
> +		/*
> +		 * Most hw generations now have a separate queue for page table
> +		 * updates, but when the queue is shared with userspace we need
> +		 * the extra CPU round trip to correctly flush the TLB.
> +		 */
> +		set_bit(DRM_SCHED_FENCE_DONT_PIPELINE, &f->flags);
>  		swap(*fence, f);
> +	}

Do you ever turn that bit off?

Regards
Luben

>  	dma_fence_put(f);
>  	return 0;
>  

  reply	other threads:[~2022-10-17  5:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14  8:15 [PATCH 1/2] drm/sched: add DRM_SCHED_FENCE_DONT_PIPELINE flag Christian König
2022-10-14  8:15 ` [PATCH 2/2] drm/amdgpu: use DRM_SCHED_FENCE_DONT_PIPELINE for VM updates Christian König
2022-10-17  5:29   ` Luben Tuikov [this message]
2022-10-17  6:27     ` Christian König
2022-10-24  7:20       ` Luben Tuikov
2022-10-18 15:11 ` [PATCH 1/2] drm/sched: add DRM_SCHED_FENCE_DONT_PIPELINE flag Christian König
2022-10-18 15:37   ` Alex Deucher
2022-10-18 22:24     ` Luben Tuikov
2022-10-24  7:17 ` Luben Tuikov

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=fd55eef9-1ce1-3f4c-d6ff-a5a230828b8e@amd.com \
    --to=luben.tuikov@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=stable@vger.kernel.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