<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:15pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
I just realized that I didn't remove the shadow pointer from the amdgpu_bo. I will update that in the next version.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Nirmoy</div>
<div id="appendonsend"></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> Das, Nirmoy <Nirmoy.Das@amd.com><br>
<b>Sent:</b> Wednesday, May 26, 2021 12:10 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Koenig, Christian <Christian.Koenig@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Das, Nirmoy <Nirmoy.Das@amd.com><br>
<b>Subject:</b> [PATCH 6/7] drm/amdgpu: remove unused code</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Remove unused code related to shadow BO.<br>
<br>
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 29 ----------------------<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 ---<br>
2 files changed, 32 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 6870cc297ae6..7930b7d9a3b1 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
@@ -638,35 +638,6 @@ int amdgpu_bo_create(struct amdgpu_device *adev,<br>
return r;<br>
}<br>
<br>
-int amdgpu_bo_create_shadow(struct amdgpu_device *adev,<br>
- unsigned long size,<br>
- struct amdgpu_bo *bo)<br>
-{<br>
- struct amdgpu_bo_param bp;<br>
- int r;<br>
-<br>
- if (bo->shadow)<br>
- return 0;<br>
-<br>
- memset(&bp, 0, sizeof(bp));<br>
- bp.size = size;<br>
- bp.domain = AMDGPU_GEM_DOMAIN_GTT;<br>
- bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC;<br>
- bp.type = ttm_bo_type_kernel;<br>
- bp.resv = bo->tbo.base.resv;<br>
- bp.bo_ptr_size = sizeof(struct amdgpu_bo);<br>
-<br>
- r = amdgpu_bo_create(adev, &bp, &bo->shadow);<br>
- if (!r) {<br>
- bo->shadow->parent = amdgpu_bo_ref(bo);<br>
- mutex_lock(&adev->shadow_list_lock);<br>
- list_add_tail(&bo->shadow->shadow_list, &adev->shadow_list);<br>
- mutex_unlock(&adev->shadow_list_lock);<br>
- }<br>
-<br>
- return r;<br>
-}<br>
-<br>
/**<br>
* amdgpu_bo_create_user - create an &amdgpu_bo_user buffer object<br>
* @adev: amdgpu device object<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h<br>
index a7fbf5f7051e..b8555c527613 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h<br>
@@ -284,9 +284,6 @@ int amdgpu_bo_create_vm(struct amdgpu_device *adev,<br>
struct amdgpu_bo_vm **ubo_ptr);<br>
void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,<br>
void **cpu_addr);<br>
-int amdgpu_bo_create_shadow(struct amdgpu_device *adev,<br>
- unsigned long size,<br>
- struct amdgpu_bo *bo);<br>
int amdgpu_bo_kmap(struct amdgpu_bo *bo, void **ptr);<br>
void *amdgpu_bo_kptr(struct amdgpu_bo *bo);<br>
void amdgpu_bo_kunmap(struct amdgpu_bo *bo);<br>
-- <br>
2.31.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>