All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Das, Nirmoy" <Nirmoy.Das@amd.com>
To: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>
Subject: Re: [PATCH 6/7] drm/amdgpu: remove unused code
Date: Wed, 26 May 2021 11:34:05 +0000	[thread overview]
Message-ID: <DM4PR12MB51365E1501638EC03C048D3F8B249@DM4PR12MB5136.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210526101027.14936-6-nirmoy.das@amd.com>


[-- Attachment #1.1: Type: text/plain, Size: 2972 bytes --]

[AMD Official Use Only]

I just realized that I didn't remove the shadow pointer from the amdgpu_bo. I will update that in the next version.

Regards,
Nirmoy
________________________________
From: Das, Nirmoy <Nirmoy.Das@amd.com>
Sent: Wednesday, May 26, 2021 12:10 PM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Koenig, Christian <Christian.Koenig@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Das, Nirmoy <Nirmoy.Das@amd.com>
Subject: [PATCH 6/7] drm/amdgpu: remove unused code

Remove unused code related to shadow BO.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 29 ----------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h |  3 ---
 2 files changed, 32 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 6870cc297ae6..7930b7d9a3b1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -638,35 +638,6 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
         return r;
 }

-int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
-                           unsigned long size,
-                           struct amdgpu_bo *bo)
-{
-       struct amdgpu_bo_param bp;
-       int r;
-
-       if (bo->shadow)
-               return 0;
-
-       memset(&bp, 0, sizeof(bp));
-       bp.size = size;
-       bp.domain = AMDGPU_GEM_DOMAIN_GTT;
-       bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC;
-       bp.type = ttm_bo_type_kernel;
-       bp.resv = bo->tbo.base.resv;
-       bp.bo_ptr_size = sizeof(struct amdgpu_bo);
-
-       r = amdgpu_bo_create(adev, &bp, &bo->shadow);
-       if (!r) {
-               bo->shadow->parent = amdgpu_bo_ref(bo);
-               mutex_lock(&adev->shadow_list_lock);
-               list_add_tail(&bo->shadow->shadow_list, &adev->shadow_list);
-               mutex_unlock(&adev->shadow_list_lock);
-       }
-
-       return r;
-}
-
 /**
  * amdgpu_bo_create_user - create an &amdgpu_bo_user buffer object
  * @adev: amdgpu device object
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
index a7fbf5f7051e..b8555c527613 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
@@ -284,9 +284,6 @@ int amdgpu_bo_create_vm(struct amdgpu_device *adev,
                         struct amdgpu_bo_vm **ubo_ptr);
 void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,
                            void **cpu_addr);
-int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
-                           unsigned long size,
-                           struct amdgpu_bo *bo);
 int amdgpu_bo_kmap(struct amdgpu_bo *bo, void **ptr);
 void *amdgpu_bo_kptr(struct amdgpu_bo *bo);
 void amdgpu_bo_kunmap(struct amdgpu_bo *bo);
--
2.31.1


[-- Attachment #1.2: Type: text/html, Size: 6293 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2021-05-26 11:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 10:10 [PATCH 1/7] drm/amdgpu: add amdgpu_bo_vm bo type Nirmoy Das
2021-05-26 10:10 ` [PATCH 2/7] drm/amdgpu: move shadow bo validation to VM code Nirmoy Das
2021-05-26 12:02   ` Christian König
2021-05-26 12:38     ` Das, Nirmoy
2021-05-26 10:10 ` [PATCH 3/7] drm/amdgpu: use amdgpu_bo_vm for vm code Nirmoy Das
2021-05-26 12:39   ` Christian König
2021-05-26 10:10 ` [PATCH 4/7] drm/amdgpu: create shadow bo directly Nirmoy Das
2021-05-26 10:10 ` [PATCH 5/7] drm/amdgpu: switch to amdgpu_bo_vm for shadow pointer Nirmoy Das
2021-05-26 10:10 ` [PATCH 6/7] drm/amdgpu: remove unused code Nirmoy Das
2021-05-26 11:34   ` Das, Nirmoy [this message]
2021-05-26 10:10 ` [PATCH v2 7/7] drm/amdgpu: do not allocate entries separately Nirmoy Das
2021-05-26 12:01 ` [PATCH 1/7] drm/amdgpu: add amdgpu_bo_vm bo type Christian König
  -- strict thread matches above, loose matches on Subject: below --
2021-05-21 12:45 Nirmoy Das
2021-05-21 12:45 ` [PATCH 6/7] drm/amdgpu: remove unused code Nirmoy Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM4PR12MB51365E1501638EC03C048D3F8B249@DM4PR12MB5136.namprd12.prod.outlook.com \
    --to=nirmoy.das@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.