Skip to contentSkip to conversation

drm/amdgpu: fix drm-next merge fallout

PATCH In review Christian König 3 participants 3 messages May 3, 2022

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

PATCH 1/1 drm/amdgpu: fix drm-next merge fallout

That hunk somehow got missing while solving the conflict between the TTM and AMDGPU changes for drm-next.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c +5 -1
index 7761a3ea172e..88de9f0d4728 100644
@@ -631,9 +631,13 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry)
 	if (!entry->bo)
 		return;
 	shadow = amdgpu_bo_shadowed(entry->bo);
+	if (shadow) {
+		ttm_bo_set_bulk_move(&shadow->tbo, NULL);
+		amdgpu_bo_unref(&shadow);
+	}
+	ttm_bo_set_bulk_move(&entry->bo->tbo, NULL);
 	entry->bo->vm_bo = NULL;
 	list_del(&entry->vm_status);
-	amdgpu_bo_unref(&shadow);
 	amdgpu_bo_unref(&entry->bo);
 }
 
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Christian König

That hunk somehow got missing while solving the conflict between the TTM and AMDGPU changes for drm-next.

Quoted 26 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c +5 -2
index 7761a3ea172e..88de9f0d4728 100644
@@ -631,9 +631,13 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry)
        if (!entry->bo)
                return;
        shadow = amdgpu_bo_shadowed(entry->bo);
+       if (shadow) {
+               ttm_bo_set_bulk_move(&shadow->tbo, NULL);
+               amdgpu_bo_unref(&shadow);
+       }
+       ttm_bo_set_bulk_move(&entry->bo->tbo, NULL);
        entry->bo->vm_bo = NULL;
        list_del(&entry->vm_status);
-       amdgpu_bo_unref(&shadow);
        amdgpu_bo_unref(&entry->bo);
 }
 
--

2.25.1

maintainer
#2 lore raw
Quoted 11 lines · Alex Deucher
Quoted 5 lines · Christian König

That hunk somehow got missing while solving the conflict between the TTM and AMDGPU changes for drm-next.

I'll pick this directly into drm-next.

Dave.

Quoted 26 lines
Quoted 26 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c +5 -2
index 7761a3ea172e..88de9f0d4728 100644
@@ -631,9 +631,13 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry)
        if (!entry->bo)
                return;
        shadow = amdgpu_bo_shadowed(entry->bo);
+       if (shadow) {
+               ttm_bo_set_bulk_move(&shadow->tbo, NULL);
+               amdgpu_bo_unref(&shadow);
+       }
+       ttm_bo_set_bulk_move(&entry->bo->tbo, NULL);
        entry->bo->vm_bo = NULL;
        list_del(&entry->vm_status);
-       amdgpu_bo_unref(&shadow);
        amdgpu_bo_unref(&entry->bo);
 }
 
--

2.25.1