Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Remove TEST_VM_ASYNC_OPS_ERROR
Date: Tue, 6 Feb 2024 12:00:32 +0100	[thread overview]
Message-ID: <a891bd71-e46b-4db2-a5c6-006688d67979@linux.intel.com> (raw)
In-Reply-To: <20240206045010.2981051-1-matthew.brost@intel.com>

Hey,

This should not have been upstreamed, so lets remove it!

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

On 2024-02-06 05:50, Matthew Brost wrote:
> TEST_VM_ASYNC_OPS_ERROR is broken and unused. Remove for now and will
> pull back in a later time when it is used, fixed, and properly hidden
> behind a Kconfig option. Also fixup the supported flags value.
> 
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs"
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_vm.c       | 28 +---------------------------
>   drivers/gpu/drm/xe/xe_vm_types.h |  8 --------
>   2 files changed, 1 insertion(+), 35 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index ed594fa2f8da..b49a5065b0e2 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -37,8 +37,6 @@
>   #include "generated/xe_wa_oob.h"
>   #include "xe_wa.h"
>   
> -#define TEST_VM_ASYNC_OPS_ERROR
> -
>   static struct drm_gem_object *xe_vm_obj(struct xe_vm *vm)
>   {
>   	return vm->gpuvm.r_obj;
> @@ -2065,7 +2063,6 @@ vm_bind_ioctl_ops_create(struct xe_vm *vm, struct xe_bo *bo,
>   	struct drm_gem_object *obj = bo ? &bo->ttm.base : NULL;
>   	struct drm_gpuva_ops *ops;
>   	struct drm_gpuva_op *__op;
> -	struct xe_vma_op *op;
>   	struct drm_gpuvm_bo *vm_bo;
>   	int err;
>   
> @@ -2112,15 +2109,6 @@ vm_bind_ioctl_ops_create(struct xe_vm *vm, struct xe_bo *bo,
>   	if (IS_ERR(ops))
>   		return ops;
>   
> -#ifdef TEST_VM_ASYNC_OPS_ERROR
> -	if (operation & FORCE_ASYNC_OP_ERROR) {
> -		op = list_first_entry_or_null(&ops->list, struct xe_vma_op,
> -					      base.entry);
> -		if (op)
> -			op->inject_error = true;
> -	}
> -#endif
> -
>   	drm_gpuva_for_each_op(__op, ops) {
>   		struct xe_vma_op *op = gpuva_op_to_vma_op(__op);
>   
> @@ -2563,13 +2551,6 @@ static int xe_vma_op_execute(struct xe_vm *vm, struct xe_vma_op *op)
>   
>   	lockdep_assert_held_write(&vm->lock);
>   
> -#ifdef TEST_VM_ASYNC_OPS_ERROR
> -	if (op->inject_error) {
> -		op->inject_error = false;
> -		return -ENOMEM;
> -	}
> -#endif
> -
>   	switch (op->base.op) {
>   	case DRM_GPUVA_OP_MAP:
>   		ret = __xe_vma_op_execute(vm, op->map.vma, op);
> @@ -2729,16 +2710,9 @@ static int vm_bind_ioctl_ops_execute(struct xe_vm *vm,
>   	return 0;
>   }
>   
> -#ifdef TEST_VM_ASYNC_OPS_ERROR
> -#define SUPPORTED_FLAGS	\
> -	(FORCE_ASYNC_OP_ERROR | DRM_XE_VM_BIND_FLAG_READONLY | \
> -	 DRM_XE_VM_BIND_FLAG_IMMEDIATE | DRM_XE_VM_BIND_FLAG_NULL | 0xffff)
> -#else
>   #define SUPPORTED_FLAGS	\
>   	(DRM_XE_VM_BIND_FLAG_READONLY | \
> -	 DRM_XE_VM_BIND_FLAG_IMMEDIATE | DRM_XE_VM_BIND_FLAG_NULL | \
> -	 0xffff)
> -#endif
> +	 DRM_XE_VM_BIND_FLAG_IMMEDIATE | DRM_XE_VM_BIND_FLAG_NULL)
>   #define XE_64K_PAGE_MASK 0xffffull
>   #define ALL_DRM_XE_SYNCS_FLAGS (DRM_XE_SYNCS_FLAG_WAIT_FOR_OP)
>   
> diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h
> index 1fec66ae2eb2..5ac9c5bebabc 100644
> --- a/drivers/gpu/drm/xe/xe_vm_types.h
> +++ b/drivers/gpu/drm/xe/xe_vm_types.h
> @@ -21,9 +21,6 @@ struct xe_bo;
>   struct xe_sync_entry;
>   struct xe_vm;
>   
> -#define TEST_VM_ASYNC_OPS_ERROR
> -#define FORCE_ASYNC_OP_ERROR	BIT(31)
> -
>   #define XE_VMA_READ_ONLY	DRM_GPUVA_USERBITS
>   #define XE_VMA_DESTROYED	(DRM_GPUVA_USERBITS << 1)
>   #define XE_VMA_ATOMIC_PTE_BIT	(DRM_GPUVA_USERBITS << 2)
> @@ -360,11 +357,6 @@ struct xe_vma_op {
>   	/** @flags: operation flags */
>   	enum xe_vma_op_flags flags;
>   
> -#ifdef TEST_VM_ASYNC_OPS_ERROR
> -	/** @inject_error: inject error to test async op error handling */
> -	bool inject_error;
> -#endif
> -
>   	union {
>   		/** @map: VMA map operation specific data */
>   		struct xe_vma_op_map map;

      parent reply	other threads:[~2024-02-06 11:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06  4:50 [PATCH] drm/xe: Remove TEST_VM_ASYNC_OPS_ERROR Matthew Brost
2024-02-06  4:57 ` ✓ CI.Patch_applied: success for " Patchwork
2024-02-06  4:58 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-06  4:58 ` ✓ CI.KUnit: success " Patchwork
2024-02-06  5:06 ` ✓ CI.Build: " Patchwork
2024-02-06  5:06 ` ✓ CI.Hooks: " Patchwork
2024-02-06  5:07 ` ✓ CI.checksparse: " Patchwork
2024-02-06  5:32 ` ✓ CI.BAT: " Patchwork
2024-02-06 11:00 ` Maarten Lankhorst [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=a891bd71-e46b-4db2-a5c6-006688d67979@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@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