Re: [PATCH 2/2] drm/amdgpu: set the executable flag on unused Vega10 PTEs

2019-01-03 Thread Christian König

Oh, good point. Completely forgot about those.

Going to fix the patch,
Christian.

Am 02.01.19 um 21:26 schrieb Kuehling, Felix:

Don't you need to update amdgpu_vm_clear_freed as well?

Regards,
   Felix

On 2019-01-02 8:35 a.m., Christian König wrote:

Otherwise we run into a non-retry fault on access.

It seems to be a hardware bug that the executable bit has
higher priority than the valid bit.

Signed-off-by: Christian König 
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 --
  1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index e73d152659a2..01a68f4e17d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -799,9 +799,15 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
addr += ats_entries * 8;
}
  
-	if (entries)

+   if (entries) {
+   uint64_t value = 0;
+
+   if (level == AMDGPU_VM_PTB && adev->asic_type >= CHIP_VEGA10)
+   value = AMDGPU_PTE_EXECUTABLE;
+
amdgpu_vm_set_pte_pde(adev, >ibs[0], addr, 0,
- entries, 0, 0);
+ entries, 0, value);
+   }
  
  	amdgpu_ring_pad_ib(ring, >ibs[0]);
  


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


Re: [PATCH 2/2] drm/amdgpu: set the executable flag on unused Vega10 PTEs

2019-01-02 Thread Deucher, Alexander
Series is:

Acked-by: Alex Deucher 


From: amd-gfx  on behalf of Christian 
König 
Sent: Wednesday, January 2, 2019 8:35:06 AM
To: amd-gfx@lists.freedesktop.org
Subject: [PATCH 2/2] drm/amdgpu: set the executable flag on unused Vega10 PTEs

Otherwise we run into a non-retry fault on access.

It seems to be a hardware bug that the executable bit has
higher priority than the valid bit.

Signed-off-by: Christian König 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index e73d152659a2..01a68f4e17d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -799,9 +799,15 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 addr += ats_entries * 8;
 }

-   if (entries)
+   if (entries) {
+   uint64_t value = 0;
+
+   if (level == AMDGPU_VM_PTB && adev->asic_type >= CHIP_VEGA10)
+   value = AMDGPU_PTE_EXECUTABLE;
+
 amdgpu_vm_set_pte_pde(adev, >ibs[0], addr, 0,
- entries, 0, 0);
+ entries, 0, value);
+   }

 amdgpu_ring_pad_ib(ring, >ibs[0]);

--
2.17.1

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