Skip to contentSkip to conversation

drm/amdgpu: correct evict flag for bo move

PATCH In review Junwei Zhang 2 participants 3 messages Jul 26, 2018 – Jul 27, 2018 2 messages not in the archive

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

PATCH 1/1 drm/amdgpu: correct evict flag for bo move

pass the evict flag instead of hard code

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2 -2
index 8c4358e..c1ae528 100644
@@ -580,7 +580,7 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo, bool evict,
 	}
 
 	/* blit VRAM to GTT */
-	r = amdgpu_move_blit(bo, true, ctx->no_wait_gpu, &tmp_mem, old_mem);
+	r = amdgpu_move_blit(bo, evict, ctx->no_wait_gpu, &tmp_mem, old_mem);
 	if (unlikely(r)) {
 		goto out_cleanup;
 	}
@@ -632,7 +632,7 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo, bool evict,
 	}
 
 	/* copy to VRAM */
-	r = amdgpu_move_blit(bo, true, ctx->no_wait_gpu, new_mem, old_mem);
+	r = amdgpu_move_blit(bo, evict, ctx->no_wait_gpu, new_mem, old_mem);
 	if (unlikely(r)) {
 		goto out_cleanup;
 	}
Signature · 6 lines
1.9.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): 1532599320-32343-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 26.07.2018 um 12:02 schrieb Junwei Zhang:

Quoted 3 lines

pass the evict flag instead of hard code

I can't come up with a reason why we shouldn't do this, but please test suspend/resume with this change just to be extra sure.

Apart from that patch is Reviewed-by: Christian König <[email protected]>.

Regards,
Christian

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
index 8c4358e..c1ae528 100644
@@ -580,7 +580,7 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo, bool evict,
  	}
 
  	/* blit VRAM to GTT */
-	r = amdgpu_move_blit(bo, true, ctx->no_wait_gpu, &tmp_mem, old_mem);
+	r = amdgpu_move_blit(bo, evict, ctx->no_wait_gpu, &tmp_mem, old_mem);
  	if (unlikely(r)) {
  		goto out_cleanup;
  	}

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo, bool evict, · line 638

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
@@ -632,7 +632,7 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo, bool evict,
  	}
 
  	/* copy to VRAM */
-	r = amdgpu_move_blit(bo, true, ctx->no_wait_gpu, new_mem, old_mem);
+	r = amdgpu_move_blit(bo, evict, ctx->no_wait_gpu, new_mem, old_mem);
  	if (unlikely(r)) {
  		goto out_cleanup;
  	}

_______________________________________________
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): 538a11a8-6cbb-0ab7-47f8-03e38f107b3b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw
Quoted 6 lines · Christian König

Am 26.07.2018 um 12:02 schrieb Junwei Zhang:

Quoted 3 lines

pass the evict flag instead of hard code

I can't come up with a reason why we shouldn't do this, but please test suspend/resume with this change just to be extra sure.

Yes, already done test for S3

Regards,
Jerry

Quoted 22 lines

Apart from that patch is Reviewed-by: Christian König <[email protected]>.

Regards,
Christian

Quoted 16 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
index 8c4358e..c1ae528 100644
@@ -580,7 +580,7 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo, bool evict,
      }
      /* blit VRAM to GTT */
-    r = amdgpu_move_blit(bo, true, ctx->no_wait_gpu, &tmp_mem, old_mem);
+    r = amdgpu_move_blit(bo, evict, ctx->no_wait_gpu, &tmp_mem, old_mem);
      if (unlikely(r)) {
          goto out_cleanup;
      }
Quoted 9 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo, bool evict, · line 637

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
@@ -632,7 +632,7 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo, bool evict,
      }
      /* copy to VRAM */
-    r = amdgpu_move_blit(bo, true, ctx->no_wait_gpu, new_mem, old_mem);
+    r = amdgpu_move_blit(bo, evict, ctx->no_wait_gpu, new_mem, old_mem);
      if (unlikely(r)) {
          goto out_cleanup;
      }

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