From: "Christian König" <christian.koenig@amd.com>
To: Nirmoy Das <nirmoy.das@amd.com>
Cc: felix.kuehling@amd.com, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/6] drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag
Date: Fri, 23 Apr 2021 09:57:14 +0200 [thread overview]
Message-ID: <744d0ad8-21b8-01ee-6a90-b75c89216b34@amd.com> (raw)
In-Reply-To: <20210422154003.4048-6-nirmoy.das@amd.com>
Am 22.04.21 um 17:40 schrieb Nirmoy Das:
> Remove unused AMDGPU_GEM_CREATE_SHADOW flag.
Please add "Userspace as never allowed to use this." to the commit message.
Christian.
>
> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 +----
> include/uapi/drm/amdgpu_drm.h | 2 --
> 2 files changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 39f88e4a8eb5..da6d4ee0a132 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -649,8 +649,7 @@ int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
> memset(&bp, 0, sizeof(bp));
> bp.size = size;
> bp.domain = AMDGPU_GEM_DOMAIN_GTT;
> - bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC |
> - AMDGPU_GEM_CREATE_SHADOW;
> + 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);
> @@ -685,7 +684,6 @@ int amdgpu_bo_create_user(struct amdgpu_device *adev,
> struct amdgpu_bo *bo_ptr;
> int r;
>
> - bp->flags = bp->flags & ~AMDGPU_GEM_CREATE_SHADOW;
> bp->bo_ptr_size = sizeof(struct amdgpu_bo_user);
> r = amdgpu_bo_create(adev, bp, &bo_ptr);
> if (r)
> @@ -1559,7 +1557,6 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m)
> amdgpu_bo_print_flag(m, bo, NO_CPU_ACCESS);
> amdgpu_bo_print_flag(m, bo, CPU_GTT_USWC);
> amdgpu_bo_print_flag(m, bo, VRAM_CLEARED);
> - amdgpu_bo_print_flag(m, bo, SHADOW);
> amdgpu_bo_print_flag(m, bo, VRAM_CONTIGUOUS);
> amdgpu_bo_print_flag(m, bo, VM_ALWAYS_VALID);
> amdgpu_bo_print_flag(m, bo, EXPLICIT_SYNC);
> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> index 8b832f7458f2..9169df7fadee 100644
> --- a/include/uapi/drm/amdgpu_drm.h
> +++ b/include/uapi/drm/amdgpu_drm.h
> @@ -119,8 +119,6 @@ extern "C" {
> #define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2)
> /* Flag that the memory should be in VRAM and cleared */
> #define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3)
> -/* Flag that create shadow bo(GTT) while allocating vram bo */
> -#define AMDGPU_GEM_CREATE_SHADOW (1 << 4)
> /* Flag that allocating the BO should use linear VRAM */
> #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5)
> /* Flag that BO is always valid in this VM */
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-04-23 7:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 15:39 [PATCH 1/6] drm/amdgpu: expose amdgpu_bo_create_shadow() Nirmoy Das
2021-04-22 15:39 ` [PATCH 2/6] drm/amdgpu: cleanup amdgpu_vm_init() Nirmoy Das
2021-04-22 16:13 ` Felix Kuehling
2021-04-22 15:40 ` [PATCH 3/6] drm/amdgpu: remove unused vm context flags Nirmoy Das
2021-04-22 16:14 ` Felix Kuehling
2021-04-22 15:40 ` [PATCH 4/6] create shadow bo using amdgpu_bo_create_shadow() Nirmoy Das
2021-04-23 7:55 ` Christian König
2021-04-23 9:32 ` Nirmoy
2021-04-22 15:40 ` [PATCH 5/6] drm/amdgpu: cleanup amdgpu_bo_create() Nirmoy Das
2021-04-22 15:40 ` [PATCH 6/6] drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag Nirmoy Das
2021-04-23 7:57 ` Christian König [this message]
2021-04-23 11:17 [PATCH 1/6] drm/amdgpu: expose amdgpu_bo_create_shadow() Nirmoy Das
2021-04-23 11:17 ` [PATCH 6/6] drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag 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=744d0ad8-21b8-01ee-6a90-b75c89216b34@amd.com \
--to=christian.koenig@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=felix.kuehling@amd.com \
--cc=nirmoy.das@amd.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).