Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Francois Dugast <francois.dugast@intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: <igt-dev@lists.freedesktop.org>, <saurabhg.gupta@intel.com>,
	<alex.zuo@intel.com>, <nirmoy.das@intel.com>
Subject: Re: [PATCH] tests/intel/xe_fault_injection: Use valid pat index
Date: Fri, 22 Nov 2024 15:46:32 +0100	[thread overview]
Message-ID: <Z0CZSOP2ppGVZOfX@fdugast-desk> (raw)
In-Reply-To: <20241121202943.149868-1-jonathan.cavitt@intel.com>

On Thu, Nov 21, 2024 at 08:29:42PM +0000, Jonathan Cavitt wrote:
> As a part of vm_bind_ioctl_check_args, all vm binds that use the
> DRM_XE_VM_BIND_OP_MAP_USERPTR operation must have a coherency mode of
> XE_COH_AT_LEAST_1WAY.  This is determined by the pat_index set in the
> bind operation before the bind is performed.
> 
> The value is usually set by intel_get_pat_idx_wb, as this is the
> default used in the various xe_vm_bind helper functions (or, more
> specifically, the pat index value DEFAULT_PAT_INDEX is passed, which
> translates to using intel_get_pat_idx_wb to generate the true value sent
> to the ioctl).  However, when the ioctl is called manually (through
> igt_ioctl, for example), it is up to the calling test to ensure the pat
> index value is correctly set, and in xe_vm, for example,
> intel_get_pat_idx_wb is used as well to set the pat index.
> 
> This step was not done in the simple_vm_bind function in
> xe_fault_injection, so use intel_get_pat_idx_wb to set the pat index.
> 
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3499
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> CC: Francois Dugast <francois.dugast@intel.com>
> CC: Nirmoy Das <nirmoy.das@intel.com>

Reviewed-by: Francois Dugast <francois.dugast@intel.com>

> ---
>  tests/intel/xe_fault_injection.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/intel/xe_fault_injection.c b/tests/intel/xe_fault_injection.c
> index 1b29041745..f8d7278caa 100644
> --- a/tests/intel/xe_fault_injection.c
> +++ b/tests/intel/xe_fault_injection.c
> @@ -17,6 +17,7 @@
>  #include "igt_device.h"
>  #include "igt_kmod.h"
>  #include "igt_sysfs.h"
> +#include "intel_pat.h"
>  #include "lib/igt_syncobj.h"
>  #include "xe/xe_ioctl.h"
>  #include "xe/xe_query.h"
> @@ -213,6 +214,7 @@ simple_vm_bind(int fd, uint32_t vm)
>  		.bind.addr = BO_ADDR,
>  		.bind.op = DRM_XE_VM_BIND_OP_MAP_USERPTR,
>  		.bind.flags = 0,
> +		.bind.pat_index = intel_get_pat_idx_wb(fd),
>  		.num_syncs = 1,
>  		.syncs = (uintptr_t)&syncobj,
>  		.exec_queue_id = 0,
> -- 
> 2.43.0
> 

  parent reply	other threads:[~2024-11-22 14:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21 20:29 [PATCH] tests/intel/xe_fault_injection: Use valid pat index Jonathan Cavitt
2024-11-21 23:42 ` ✓ Xe.CI.BAT: success for " Patchwork
2024-11-21 23:54 ` ✗ i915.CI.BAT: failure " Patchwork
2024-11-22 14:46 ` Francois Dugast [this message]
2024-11-22 15:04 ` ✗ Xe.CI.Full: " 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=Z0CZSOP2ppGVZOfX@fdugast-desk \
    --to=francois.dugast@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=nirmoy.das@intel.com \
    --cc=saurabhg.gupta@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