From: Nirmoy Das <nirmoy.das@intel.com>
To: <intel-xe@lists.freedesktop.org>
Cc: "Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH] drm/xe: Remove unused cpu_atomic bo flag
Date: Mon, 11 Mar 2024 16:22:13 +0100 [thread overview]
Message-ID: <515970f8-36f6-45d7-8a95-2d40e66347d4@intel.com> (raw)
In-Reply-To: <20240311143415.6509-1-nirmoy.das@intel.com>
Actually the whole property struct is not being used. I will resend this
with other unused members.
On 3/11/2024 3:34 PM, Nirmoy Das wrote:
> cpu_atomic is not set so remove it and also related dead
> code.
>
> Fixes: ddfa2d6a846a ("drm/xe/uapi: Kill VM_MADVISE IOCTL")
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
> Cc: intel-xe@lists.freedesktop.org
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
> drivers/gpu/drm/xe/xe_bo.c | 22 +++-------------------
> drivers/gpu/drm/xe/xe_bo_types.h | 5 -----
> 2 files changed, 3 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> index b89ac6db68a1..edf78505091e 100644
> --- a/drivers/gpu/drm/xe/xe_bo.c
> +++ b/drivers/gpu/drm/xe/xe_bo.c
> @@ -1118,13 +1118,6 @@ static void xe_gem_object_close(struct drm_gem_object *obj,
> }
> }
>
> -static bool should_migrate_to_system(struct xe_bo *bo)
> -{
> - struct xe_device *xe = xe_bo_device(bo);
> -
> - return xe_device_in_fault_mode(xe) && bo->props.cpu_atomic;
> -}
> -
> static vm_fault_t xe_gem_fault(struct vm_fault *vmf)
> {
> struct ttm_buffer_object *tbo = vmf->vma->vm_private_data;
> @@ -1133,7 +1126,7 @@ static vm_fault_t xe_gem_fault(struct vm_fault *vmf)
> struct xe_bo *bo = ttm_to_xe_bo(tbo);
> bool needs_rpm = bo->flags & XE_BO_CREATE_VRAM_MASK;
> vm_fault_t ret;
> - int idx, r = 0;
> + int idx;
>
> if (needs_rpm)
> xe_device_mem_access_get(xe);
> @@ -1145,17 +1138,8 @@ static vm_fault_t xe_gem_fault(struct vm_fault *vmf)
> if (drm_dev_enter(ddev, &idx)) {
> trace_xe_bo_cpu_fault(bo);
>
> - if (should_migrate_to_system(bo)) {
> - r = xe_bo_migrate(bo, XE_PL_TT);
> - if (r == -EBUSY || r == -ERESTARTSYS || r == -EINTR)
> - ret = VM_FAULT_NOPAGE;
> - else if (r)
> - ret = VM_FAULT_SIGBUS;
> - }
> - if (!ret)
> - ret = ttm_bo_vm_fault_reserved(vmf,
> - vmf->vma->vm_page_prot,
> - TTM_BO_VM_NUM_PREFAULT);
> + ret = ttm_bo_vm_fault_reserved(vmf, vmf->vma->vm_page_prot,
> + TTM_BO_VM_NUM_PREFAULT);
> drm_dev_exit(idx);
> } else {
> ret = ttm_bo_vm_dummy_page(vmf, vmf->vma->vm_page_prot);
> diff --git a/drivers/gpu/drm/xe/xe_bo_types.h b/drivers/gpu/drm/xe/xe_bo_types.h
> index 14ef13b7b421..f62a130fc948 100644
> --- a/drivers/gpu/drm/xe/xe_bo_types.h
> +++ b/drivers/gpu/drm/xe/xe_bo_types.h
> @@ -64,11 +64,6 @@ struct xe_bo {
> s16 preferred_gt;
> /** @preferred_mem_type: preferred memory type */
> s32 preferred_mem_type;
> - /**
> - * @cpu_atomic: the CPU expects to do atomics operations to
> - * this BO
> - */
> - bool cpu_atomic;
> /**
> * @device_atomic: the device expects to do atomics operations
> * to this BO
next prev parent reply other threads:[~2024-03-11 15:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 14:34 [PATCH] drm/xe: Remove unused cpu_atomic bo flag Nirmoy Das
2024-03-11 15:08 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-11 15:09 ` ✓ CI.checkpatch: " Patchwork
2024-03-11 15:10 ` ✓ CI.KUnit: " Patchwork
2024-03-11 15:20 ` ✓ CI.Build: " Patchwork
2024-03-11 15:21 ` ✓ CI.Hooks: " Patchwork
2024-03-11 15:22 ` Nirmoy Das [this message]
2024-03-11 15:22 ` ✓ CI.checksparse: " Patchwork
2024-03-11 15:48 ` ✓ CI.BAT: " Patchwork
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=515970f8-36f6-45d7-8a95-2d40e66347d4@intel.com \
--to=nirmoy.das@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=thomas.hellstrom@linux.intel.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