All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/amdgpu: vm flush needed after updating PDEs
@ 2022-05-10 14:36 Philip Yang
  2022-05-10 15:07 ` Christian König
  0 siblings, 1 reply; 2+ messages in thread
From: Philip Yang @ 2022-05-10 14:36 UTC (permalink / raw)
  To: amd-gfx; +Cc: Philip Yang, christian.koenig

If page table PDEs is evicted and restored, after updating PDEs, need
increase vm->tlb_seq, then amdgpu_vm_flush will flush TLB before command
submission.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 7276b03ef970..9596c22fded6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -764,6 +764,9 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev,
 	if (r)
 		goto error;
 
+	/* vm_flush_needed after updating PDEs */
+	atomic64_inc(&vm->tlb_seq);
+
 	while (!list_empty(&vm->relocated)) {
 		entry = list_first_entry(&vm->relocated,
 					 struct amdgpu_vm_bo_base,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] drm/amdgpu: vm flush needed after updating PDEs
  2022-05-10 14:36 [PATCH 1/1] drm/amdgpu: vm flush needed after updating PDEs Philip Yang
@ 2022-05-10 15:07 ` Christian König
  0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2022-05-10 15:07 UTC (permalink / raw)
  To: Philip Yang, amd-gfx

Am 10.05.22 um 16:36 schrieb Philip Yang:
> If page table PDEs is evicted and restored, after updating PDEs, need
> increase vm->tlb_seq, then amdgpu_vm_flush will flush TLB before command
> submission.
>
> Signed-off-by: Philip Yang <Philip.Yang@amd.com>

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

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 7276b03ef970..9596c22fded6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -764,6 +764,9 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev,
>   	if (r)
>   		goto error;
>   
> +	/* vm_flush_needed after updating PDEs */
> +	atomic64_inc(&vm->tlb_seq);
> +
>   	while (!list_empty(&vm->relocated)) {
>   		entry = list_first_entry(&vm->relocated,
>   					 struct amdgpu_vm_bo_base,


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-10 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 14:36 [PATCH 1/1] drm/amdgpu: vm flush needed after updating PDEs Philip Yang
2022-05-10 15:07 ` Christian König

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.