<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Christian König <ckoenig.leichtzumerken@gmail.com><br>
<b>Sent:</b> Friday, November 30, 2018 7:45:17 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> [PATCH] drm/amdgpu: remove amdgpu_bo_backup_to_shadow</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">It is unused.<br>
<br>
Signed-off-by: Christian König <christian.koenig@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 47 ----------------------<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h |  5 ---<br>
 2 files changed, 52 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
index cf768acb51dc..cc50cb65c212 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
@@ -607,53 +607,6 @@ int amdgpu_bo_create(struct amdgpu_device *adev,<br>
         return r;<br>
 }<br>
 <br>
-/**<br>
- * amdgpu_bo_backup_to_shadow - Backs up an &amdgpu_bo buffer object<br>
- * @adev: amdgpu device object<br>
- * @ring: amdgpu_ring for the engine handling the buffer operations<br>
- * @bo: &amdgpu_bo buffer to be backed up<br>
- * @resv: reservation object with embedded fence<br>
- * @fence: dma_fence associated with the operation<br>
- * @direct: whether to submit the job directly<br>
- *<br>
- * Copies an &amdgpu_bo buffer object to its shadow object.<br>
- * Not used for now.<br>
- *<br>
- * Returns:<br>
- * 0 for success or a negative error code on failure.<br>
- */<br>
-int amdgpu_bo_backup_to_shadow(struct amdgpu_device *adev,<br>
-                              struct amdgpu_ring *ring,<br>
-                              struct amdgpu_bo *bo,<br>
-                              struct reservation_object *resv,<br>
-                              struct dma_fence **fence,<br>
-                              bool direct)<br>
-<br>
-{<br>
-       struct amdgpu_bo *shadow = bo->shadow;<br>
-       uint64_t bo_addr, shadow_addr;<br>
-       int r;<br>
-<br>
-       if (!shadow)<br>
-               return -EINVAL;<br>
-<br>
-       bo_addr = amdgpu_bo_gpu_offset(bo);<br>
-       shadow_addr = amdgpu_bo_gpu_offset(bo->shadow);<br>
-<br>
-       r = reservation_object_reserve_shared(bo->tbo.resv, 1);<br>
-       if (r)<br>
-               goto err;<br>
-<br>
-       r = amdgpu_copy_buffer(ring, bo_addr, shadow_addr,<br>
-                              amdgpu_bo_size(bo), resv, fence,<br>
-                              direct, false);<br>
-       if (!r)<br>
-               amdgpu_bo_fence(bo, *fence, true);<br>
-<br>
-err:<br>
-       return r;<br>
-}<br>
-<br>
 /**<br>
  * amdgpu_bo_validate - validate an &amdgpu_bo buffer object<br>
  * @bo: pointer to the buffer object<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h<br>
index 7d3312d0da11..9291c2f837e9 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h<br>
@@ -267,11 +267,6 @@ int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo);<br>
 void amdgpu_bo_fence(struct amdgpu_bo *bo, struct dma_fence *fence,<br>
                      bool shared);<br>
 u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo);<br>
-int amdgpu_bo_backup_to_shadow(struct amdgpu_device *adev,<br>
-                              struct amdgpu_ring *ring,<br>
-                              struct amdgpu_bo *bo,<br>
-                              struct reservation_object *resv,<br>
-                              struct dma_fence **fence, bool direct);<br>
 int amdgpu_bo_validate(struct amdgpu_bo *bo);<br>
 int amdgpu_bo_restore_shadow(struct amdgpu_bo *shadow,<br>
                              struct dma_fence **fence);<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>