Skip to contentSkip to conversation

drm/amdgpu: fix VM clearing for the root PD

PATCH In review Christian König 4 participants 7 messages Aug 17, 2018 – Aug 20, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix VM clearing for the root PD

We need to figure out the address after validating the BO, not before.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
index 662e8a34d52c..662aec5c81d4 100644
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 	uint64_t addr;
 	int r;
 
-	addr = amdgpu_bo_gpu_offset(bo);
 	entries = amdgpu_bo_size(bo) / 8;
 
 	if (pte_support_ats) {
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 	if (r)
 		goto error;
 
+	addr = amdgpu_bo_gpu_offset(bo);
 	if (ats_entries) {
 		uint64_t ats_value;
 
Signature · 6 lines
2.17.1

_______________________________________________
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): 20180817122422.1384-1-christian.koenig-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 3 lines · Christian König

We need to figure out the address after validating the BO, not before.

Quoted 17 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -1
index 662e8a34d52c..662aec5c81d4 100644
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 	uint64_t addr;
 	int r;
 
-	addr = amdgpu_bo_gpu_offset(bo);
 	entries = amdgpu_bo_size(bo) / 8;
 
 	if (pte_support_ats) {

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, · line 406

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 	if (r)
 		goto error;
 
+	addr = amdgpu_bo_gpu_offset(bo);
 	if (ats_entries) {
 		uint64_t ats_value;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Junwei Zhang
#3 lore raw
In reply to a message not in the archive
Quoted 3 lines · Christian König

We need to figure out the address after validating the BO, not before.

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -1
index 662e8a34d52c..662aec5c81d4 100644
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
  	uint64_t addr;
  	int r;
 
-	addr = amdgpu_bo_gpu_offset(bo);
  	entries = amdgpu_bo_size(bo) / 8;
 
  	if (pte_support_ats) {

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, · line 406

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
  	if (r)
  		goto error;
 
+	addr = amdgpu_bo_gpu_offset(bo);
  	if (ats_entries) {
  		uint64_t ats_value;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Junwei Zhang
#4 lore raw
In reply to a message not in the archive
Quoted 3 lines · Christian König

We need to figure out the address after validating the BO, not before.

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -1
index 662e8a34d52c..662aec5c81d4 100644
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
  	uint64_t addr;
  	int r;
 
-	addr = amdgpu_bo_gpu_offset(bo);
  	entries = amdgpu_bo_size(bo) / 8;
 
  	if (pte_support_ats) {

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, · line 406

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
  	if (r)
  		goto error;
 
+	addr = amdgpu_bo_gpu_offset(bo);
  	if (ats_entries) {
  		uint64_t ats_value;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Junwei Zhang
#5 lore raw
In reply to a message not in the archive
Quoted 3 lines · Christian König

We need to figure out the address after validating the BO, not before.

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -1
index 662e8a34d52c..662aec5c81d4 100644
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
  	uint64_t addr;
  	int r;
 
-	addr = amdgpu_bo_gpu_offset(bo);
  	entries = amdgpu_bo_size(bo) / 8;
 
  	if (pte_support_ats) {

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, · line 406

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
  	if (r)
  		goto error;
 
+	addr = amdgpu_bo_gpu_offset(bo);
  	if (ats_entries) {
  		uint64_t ats_value;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Junwei Zhang
#6 lore raw
In reply to a message not in the archive
Quoted 9 lines

From: amd-gfx <[email protected]> On Behalf Of Christian K?nig
Sent: Friday, August 17, 2018 20:24
To: [email protected]
Subject: [PATCH] drm/amdgpu: fix VM clearing for the root PD

We need to figure out the address after validating the BO, not before.

Quoted 30 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -1
index 662e8a34d52c..662aec5c81d4 100644
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device
 *adev,
 	uint64_t addr;
 	int r;
 
-	addr = amdgpu_bo_gpu_offset(bo);
 	entries = amdgpu_bo_size(bo) / 8;
 
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
 	if (pte_support_ats) {
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device
 *adev,
 	if (r)
 		goto error;
 
+	addr = amdgpu_bo_gpu_offset(bo);
 	if (ats_entries) {
 		uint64_t ats_value;
 
--

2.17.1

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

Reviewed-by
#7 lore raw
In reply to a message not in the archive
Quoted 3 lines · Christian König

We need to figure out the address after validating the BO, not before.

Quoted 31 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
index 662e8a34d52c..662aec5c81d4 100644
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 	uint64_t addr;
 	int r;
 
-	addr = amdgpu_bo_gpu_offset(bo);
 	entries = amdgpu_bo_size(bo) / 8;
 
 	if (pte_support_ats) {
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 	if (r)
 		goto error;
 
+	addr = amdgpu_bo_gpu_offset(bo);
 	if (ats_entries) {
 		uint64_t ats_value;
 
Signature · 6 lines
2.17.1

_______________________________________________
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