public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Farah Kassabri <farah.kassabri@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <ilia.levi@intel.com>
Subject: Re: [PATCH v2 1/2] drm/xe: s/xe_vm_bind_kernel_bo/xe_kernel_vm_bind_bo
Date: Tue, 20 Jan 2026 14:51:24 -0800	[thread overview]
Message-ID: <aXAG7D+thRBlHSk3@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20260119150330.6537-1-farah.kassabri@intel.com>

On Mon, Jan 19, 2026 at 05:03:29PM +0200, Farah Kassabri wrote:
> The existing function `xe_vm_bind_kernel_bo` was originally used to bind
> a buffer object to the kernel VM, but the name implies it only works for
> kernel BOs. To clarify its purpose, the function is renamed to
> `xe_kernel_vm_bind_bo`.
> 
> Signed-off-by: Farah Kassabri <farah.kassabri@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_pxp_submit.c | 2 +-
>  drivers/gpu/drm/xe/xe_vm.c         | 7 +++----
>  drivers/gpu/drm/xe/xe_vm.h         | 2 +-
>  3 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pxp_submit.c b/drivers/gpu/drm/xe/xe_pxp_submit.c
> index e60526e30030..e23ee12d8e1d 100644
> --- a/drivers/gpu/drm/xe/xe_pxp_submit.c
> +++ b/drivers/gpu/drm/xe/xe_pxp_submit.c
> @@ -130,7 +130,7 @@ static int allocate_gsc_client_resources(struct xe_gt *gt,
>  	if (err)
>  		goto vm_out;
>  
> -	fence = xe_vm_bind_kernel_bo(vm, bo, NULL, 0, XE_CACHE_WB);
> +	fence = xe_vm_kernel_bind_bo(vm, bo, NULL, 0, XE_CACHE_WB);
>  	if (IS_ERR(fence)) {
>  		err = PTR_ERR(fence);
>  		goto bo_out;
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 694f592a0f01..a27145a4137e 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -3830,20 +3830,19 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
>  }
>  
>  /**
> - * xe_vm_bind_kernel_bo - bind a kernel BO to a VM
> + * xe_vm_kernel_bind_bo - bind a BO to a kernel owned VM

While you are here - s/xe_vm_kernel_bind_bo/xe_vm_kernel_bind_bo()

foo() is the prefered style [1], we are going to fixup all of Xe shortly.

Anyways I can fix that when merging this one, with that:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>

[1] https://docs.kernel.org/doc-guide/kernel-doc.html

>   * @vm: VM to bind the BO to
>   * @bo: BO to bind
>   * @q: exec queue to use for the bind (optional)
>   * @addr: address at which to bind the BO
>   * @cache_lvl: PAT cache level to use
>   *
> - * Execute a VM bind map operation on a kernel-owned BO to bind it into a
> - * kernel-owned VM.
> + * Execute a VM bind map operation on a BO to bind it into a kernel-owned VM.
>   *
>   * Returns a dma_fence to track the binding completion if the job to do so was
>   * successfully submitted, an error pointer otherwise.
>   */
> -struct dma_fence *xe_vm_bind_kernel_bo(struct xe_vm *vm, struct xe_bo *bo,
> +struct dma_fence *xe_vm_kernel_bind_bo(struct xe_vm *vm, struct xe_bo *bo,
>  				       struct xe_exec_queue *q, u64 addr,
>  				       enum xe_cache_level cache_lvl)
>  {
> diff --git a/drivers/gpu/drm/xe/xe_vm.h b/drivers/gpu/drm/xe/xe_vm.h
> index 6cc98df47291..ff32f43aa1d8 100644
> --- a/drivers/gpu/drm/xe/xe_vm.h
> +++ b/drivers/gpu/drm/xe/xe_vm.h
> @@ -268,7 +268,7 @@ int xe_vm_lock_vma(struct drm_exec *exec, struct xe_vma *vma);
>  int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec,
>  			  unsigned int num_fences);
>  
> -struct dma_fence *xe_vm_bind_kernel_bo(struct xe_vm *vm, struct xe_bo *bo,
> +struct dma_fence *xe_vm_kernel_bind_bo(struct xe_vm *vm, struct xe_bo *bo,
>  				       struct xe_exec_queue *q, u64 addr,
>  				       enum xe_cache_level cache_lvl);
>  
> -- 
> 2.43.0
> 
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 

      parent reply	other threads:[~2026-01-20 22:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-19 15:03 [PATCH v2 1/2] drm/xe: s/xe_vm_bind_kernel_bo/xe_kernel_vm_bind_bo Farah Kassabri
2026-01-19 15:03 ` [PATCH v2 2/2] drm/xe: add kernel VM BO unbind helper Farah Kassabri
2026-01-20 22:56   ` Matthew Brost
2026-02-06  0:49   ` Matthew Brost
2026-01-19 15:10 ` ✗ CI.KUnit: failure for series starting with [v2,1/2] drm/xe: s/xe_vm_bind_kernel_bo/xe_kernel_vm_bind_bo Patchwork
2026-01-20 22:51 ` Matthew Brost [this message]

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=aXAG7D+thRBlHSk3@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=farah.kassabri@intel.com \
    --cc=ilia.levi@intel.com \
    --cc=intel-xe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox