AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Grodzovsky <Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org>
To: "Koenig,
	Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Deucher, Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
Subject: Fixing SDMA TO after GPU reset
Date: Mon, 10 Sep 2018 18:52:28 -0400	[thread overview]
Message-ID: <059118f3-2729-12a1-7c8d-e306f69369aa@amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

Attached patch fixes SDMA TO after GPU reset, it's a regression caused 
by cbd5285 drm/amdgpu: move setting the GART addr into TTM.

But to me it looks safer just to revert the original patch all together 
since we never can predict for sure if VM flush will take place and so 
it's safer to just always assign job->vm_pd_addr.

Andrey


[-- Attachment #2: 0001-drm-amdgpu-Fix-SDMA-TO-after-GPU-reset.patch --]
[-- Type: text/x-patch, Size: 1029 bytes --]

>From 038ca047fc41d85fb390b9564cebc7c6da441831 Mon Sep 17 00:00:00 2001
From: Andrey Grodzovsky <andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
Date: Mon, 10 Sep 2018 18:43:58 -0400
Subject: drm/amdgpu: Fix SDMA TO after GPU reset

After GPU reset amdgpu_vm_clear_bo triggers VM flush
but job->vm_pd_addr is not set causing SDMA TO.

Fixes cbd5285 drm/amdgpu: move setting the GART addr into TTM.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index f5a9600..88598b1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -526,6 +526,8 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 	if (r)
 		goto error;
 
+	job->vm_pd_addr = amdgpu_gmc_pd_addr(adev->gart.bo);
+
 	addr = amdgpu_bo_gpu_offset(bo);
 	if (ats_entries) {
 		uint64_t ats_value;
-- 
2.7.4


[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

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

             reply	other threads:[~2018-09-10 22:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 22:52 Andrey Grodzovsky [this message]
     [not found] ` <059118f3-2729-12a1-7c8d-e306f69369aa-5C7GfCeVMHo@public.gmane.org>
2018-09-11 11:46   ` Fixing SDMA TO after GPU reset Christian König
     [not found]     ` <aa21f524-ac5e-ddb7-448a-d12ec1599a59-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-11 13:54       ` Andrey Grodzovsky
     [not found]         ` <e73cb83b-750c-fd4f-40c9-635cd04bd979-5C7GfCeVMHo@public.gmane.org>
2018-09-11 13:57           ` Koenig, Christian

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=059118f3-2729-12a1-7c8d-e306f69369aa@amd.com \
    --to=andrey.grodzovsky-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=Christian.Koenig-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox