drm/amdgpu: fix PRT cleanup order in the VM
Subsystems (2)
PATCH 1/2 drm/amdgpu: fix PRT cleanup order in the VM
From: Christian König <[email protected]>
We need to unmap the PRTs first and then free our scheduler entity.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2 -2
@@ -1687,8 +1687,6 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)struct amdgpu_bo_va_mapping *mapping, *tmp;int i; -amd_sched_entity_fini (vm->entity.sched, &vm->entity); -if (!RB_EMPTY_ROOT (&vm->va)) {dev_err (adev->dev,"still active bo inside vm\n" ); }
@@ -1706,6 +1704,8 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) }amdgpu_vm_clear_freed (adev, vm); +amd_sched_entity_fini (vm->entity.sched, &vm->entity); +for (i =0 ; i <amdgpu_vm_num_pdes (adev); i++) {struct amdgpu_bo *pt = vm->page_tables[i].bo;
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1486992233-2052-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
PATCH 2/2 drm/amdgpu: fix PTE defines
From: Christian König <[email protected]>
Those should be 64bit, even on a 32bit system.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +7 -7
@@ -53,19 +53,19 @@ struct amdgpu_bo_list_entry;/* LOG2 number of continuous pages for the fragment field */ #define AMDGPU_LOG2_PAGES_PER_FRAG 4 -#define AMDGPU_PTE_VALID (1 << 0) -#define AMDGPU_PTE_SYSTEM (1 << 1) -#define AMDGPU_PTE_SNOOPED (1 << 2) +#define AMDGPU_PTE_VALID (1ULL << 0) +#define AMDGPU_PTE_SYSTEM (1ULL << 1) +#define AMDGPU_PTE_SNOOPED (1ULL << 2)/* VI only */ -#define AMDGPU_PTE_EXECUTABLE (1 << 4) +#define AMDGPU_PTE_EXECUTABLE (1ULL << 4) -#define AMDGPU_PTE_READABLE (1 << 5) -#define AMDGPU_PTE_WRITEABLE (1 << 6) +#define AMDGPU_PTE_READABLE (1ULL << 5) +#define AMDGPU_PTE_WRITEABLE (1ULL << 6)#define AMDGPU_PTE_FRAG (x) ((x & 0x1f) << 7) -#define AMDGPU_PTE_PRT (1UL << 63) +#define AMDGPU_PTE_PRT (1ULL << 63)/* How to programm VM fault handling */ #define AMDGPU_VM_FAULT_STOP_NEVER 0
Signature · 6 lines
2.5.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1486992233-2052-2-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherRE: [PATCH 2/2] drm/amdgpu: fix PTE defines
Quoted 7 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Christian König
Sent: Monday, February 13, 2017 8:24 AM
To: [email protected]
Subject: [PATCH 2/2] drm/amdgpu: fix PTE defines
Quoted 5 lines
From: Christian König <[email protected]>
Those should be 64bit, even on a 32bit system.
Signed-off-by Christian König <[email protected]>
Series is:
Quoted 39 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +7
-8@@ -53,19 +53,19 @@ struct amdgpu_bo_list_entry;/* LOG2 number of continuous pages for the fragment field */ #define AMDGPU_LOG2_PAGES_PER_FRAG 4 -#define AMDGPU_PTE_VALID (1 << 0) -#define AMDGPU_PTE_SYSTEM (1 << 1) -#define AMDGPU_PTE_SNOOPED (1 << 2) +#define AMDGPU_PTE_VALID (1ULL << 0) +#define AMDGPU_PTE_SYSTEM (1ULL << 1) +#define AMDGPU_PTE_SNOOPED (1ULL << 2)/* VI only */ -#define AMDGPU_PTE_EXECUTABLE (1 << 4) +#define AMDGPU_PTE_EXECUTABLE (1ULL << 4) -#define AMDGPU_PTE_READABLE (1 << 5) -#define AMDGPU_PTE_WRITEABLE (1 << 6) +#define AMDGPU_PTE_READABLE (1ULL << 5) +#define AMDGPU_PTE_WRITEABLE (1ULL << 6)#define AMDGPU_PTE_FRAG (x) ((x & 0x1f) << 7) -#define AMDGPU_PTE_PRT (1UL << 63) +#define AMDGPU_PTE_PRT (1ULL << 63)/* How to programm VM fault handling */ #define AMDGPU_VM_FAULT_STOP_NEVER 0 --2.5.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB165278DC90AA78297CB18BAEF7590-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Zhang, Jerry
Reviewed-by Junwei ZhangRE: [PATCH 2/2] drm/amdgpu: fix PTE defines
Regards,
Jerry (Junwei Zhang)
Linux Base Graphics
SRDC Software Development
_____________________________________
Quoted 14 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Deucher, Alexander
Sent: Tuesday, February 14, 2017 0:24
To: 'Christian König'; [email protected]
Subject: RE: [PATCH 2/2] drm/amdgpu: fix PTE definesQuoted 7 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Christian König
Sent: Monday, February 13, 2017 8:24 AM
To: [email protected]
Subject: [PATCH 2/2] drm/amdgpu: fix PTE defines
Quoted 8 lines
Quoted 5 lines
From: Christian König <[email protected]>
Those should be 64bit, even on a 32bit system.
Signed-off-by Christian König <[email protected]>Series is:
Reviewed-by Alex Deucher <[email protected]>
Quoted 40 lines
Quoted 40 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +0
-0@@ -53,19 +53,19 @@ struct amdgpu_bo_list_entry; /* LOG2 number of continuous pages for the fragment field */ #define
AMDGPU_LOG2_PAGES_PER_FRAG4drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +7
-8-#define AMDGPU_PTE_VALID (1 << 0) -#define AMDGPU_PTE_SYSTEM (1 << 1) -#define AMDGPU_PTE_SNOOPED (1 << 2) +#define AMDGPU_PTE_VALID (1ULL << 0) +#define AMDGPU_PTE_SYSTEM (1ULL << 1) +#define AMDGPU_PTE_SNOOPED (1ULL << 2)/* VI only */ -#define AMDGPU_PTE_EXECUTABLE (1 << 4) +#define AMDGPU_PTE_EXECUTABLE (1ULL << 4) -#define AMDGPU_PTE_READABLE (1 << 5) -#define AMDGPU_PTE_WRITEABLE (1 << 6) +#define AMDGPU_PTE_READABLE (1ULL << 5) +#define AMDGPU_PTE_WRITEABLE (1ULL << 6)#define AMDGPU_PTE_FRAG (x) ((x & 0x1f) << 7) -#define AMDGPU_PTE_PRT (1UL << 63) +#define AMDGPU_PTE_PRT (1ULL << 63)/* How to programm VM fault handling */ #define AMDGPU_VM_FAULT_STOP_NEVER 0 --2.5.0
Quoted 8 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Nicolai Hähnle
Reviewed-byQuoted 3 lines · Christian König
From: Christian König <[email protected]>
We need to unmap the PRTs first and then free our scheduler entity.
Thanks for the quick fix! Both patches are
... and I'll probably get around to testing them soon, as well.
Quoted 21 lines
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-2@@ -1687,8 +1687,6 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)struct amdgpu_bo_va_mapping *mapping, *tmp;int i; -amd_sched_entity_fini (vm->entity.sched, &vm->entity); -if (!RB_EMPTY_ROOT (&vm->va)) {dev_err (adev->dev,"still active bo inside vm\n" ); }
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) · line 1711
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2
-0@@ -1706,6 +1704,8 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) }amdgpu_vm_clear_freed (adev, vm); +amd_sched_entity_fini (vm->entity.sched, &vm->entity); +for (i =0 ; i <amdgpu_vm_num_pdes (adev); i++) {struct amdgpu_bo *pt = vm->page_tables[i].bo;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 675995bf-35d9-53bd-810e-72353331d653-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 10 lines · Nicolai Hähnle
Quoted 3 lines · Christian König
From: Christian König <[email protected]>
We need to unmap the PRTs first and then free our scheduler entity.
Thanks for the quick fix! Both patches are
Reviewed-by Nicolai Hähnle <[email protected]>... and I'll probably get around to testing them soon, as well.
Hmm, I still get both the "suspicious RCU" and amdgpu_bo_gpu_offset warning.
Nicolai
Quoted 27 lines
Quoted 27 lines
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-2@@ -1687,8 +1687,6 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)struct amdgpu_bo_va_mapping *mapping, *tmp;int i; -amd_sched_entity_fini (vm->entity.sched, &vm->entity); -if (!RB_EMPTY_ROOT (&vm->va)) {dev_err (adev->dev,"still active bo inside vm\n" );}drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0@@ -1706,6 +1704,8 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) }amdgpu_vm_clear_freed (adev, vm);
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) · line 1710
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2
-0+amd_sched_entity_fini (vm->entity.sched, &vm->entity); +for (i =0 ; i <amdgpu_vm_num_pdes (adev); i++) {struct amdgpu_bo *pt = vm->page_tables[i].bo;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1ae09354-6e3a-f868-6011-02f0dd9b9553-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Am 13.02.2017 um 18:32 schrieb Nicolai Hähnle:
Quoted 6 lines · Nicolai Hähnle
Quoted 5 lines · Christian König
Quoted 3 lines
From: Christian König <[email protected]>
We need to unmap the PRTs first and then free our scheduler entity.
Quoted 7 lines
Quoted 5 lines
Thanks for the quick fix! Both patches are
Reviewed-by Nicolai Hähnle <[email protected]>... and I'll probably get around to testing them soon, as well.
Hmm, I still get both the "suspicious RCU" and
amdgpu_bo_gpu_offsetwarning.
Yeah, that's actually another issue. Going to work on that as well.
I probably should come up with a more complete solution covering both cases.
Regards,
Christian.
Quoted 38 lines
Nicolai
Quoted 34 lines
Quoted 33 lines
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-2@@ -1687,8 +1687,6 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)struct amdgpu_bo_va_mapping *mapping, *tmp;int i; -amd_sched_entity_fini (vm->entity.sched, &vm->entity); -if (!RB_EMPTY_ROOT (&vm->va)) {dev_err (adev->dev,"still active bo inside vm\n" );}drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2
-0@@ -1706,6 +1704,8 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) }amdgpu_vm_clear_freed (adev, vm); +amd_sched_entity_fini (vm->entity.sched, &vm->entity); +for (i =0 ; i <amdgpu_vm_num_pdes (adev); i++) {struct amdgpu_bo *pt = vm->page_tables[i].bo;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx