[PATCH i-g-t] tests/intel/xe_vm: Fix WB caching PAT index for coherency mode
Zeng, Oak
oak.zeng at intel.com
Tue Mar 26 18:46:34 UTC 2024
Hi Jagmeet,
> -----Original Message-----
> From: Randhawa, Jagmeet <jagmeet.randhawa at intel.com>
> Sent: Monday, March 25, 2024 5:27 PM
> Cc: igt-dev at lists.freedesktop.org; Zeng, Oak <oak.zeng at intel.com>; Cavitt,
> Jonathan <jonathan.cavitt at intel.com>; Auld, Matthew
> <matthew.auld at intel.com>; kamil.konieczny at linux.intel.com; Randhawa,
> Jagmeet <jagmeet.randhawa at intel.com>
> Subject: [PATCH i-g-t] tests/intel/xe_vm: Fix WB caching PAT index for coherency
> mode
>
> Resolve a coherency conflict by setting the
> correct PAT index for WB caching with
> intel_get_pat_idx_wb(fd), addressing the
> mismatch between the default "XE_COH_NONE"
> coherency mode and DRM_XE_GEM_CPU_CACHING_WB.
I feel the description here is still not very clear. Isn't a confliction b/t the default cpu caching_mode and default pat_index?
Again, XE_COH_NONE is a xekmd *internal* concept, not part of xekmd uAPI. User can't set the XE_COH_NONE mode. I think this is determined by pat_index....
By looking at driver, I figured the only not allowed setting is: cpu_caching == WB && a pat_index which indicates a XE_COH_NONE coherence mode...
So maybe something like: driver doesn't allow cpu_caching == WB && a pat_index which indicates a XE_COH_NONE coherence mode
The code looks good to me. So it is reviewed-by: Oak Zeng <oak.zeng at intel.com>. Improve a little the description message if you want.
Oak
> This conflict occurs for VLK:54352.
>
> Cc: Jonathan Cavitt <jonathan.cavitt at intel.com>
> Cc: Matthew Auld <matthew.auld at intel.com>
> Cc: Oak Zeng <oak.zeng at intel.com>
> Signed-off-by: Jagmeet Randhawa <jagmeet.randhawa at intel.com>
> ---
> tests/intel/xe_vm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
> index 7c061c497..1f458174d 100644
> --- a/tests/intel/xe_vm.c
> +++ b/tests/intel/xe_vm.c
> @@ -1789,6 +1789,7 @@ static void bind_flag_invalid(int fd)
> bind.bind.range = bo_size;
> bind.bind.addr = addr;
> bind.bind.op = DRM_XE_VM_BIND_OP_MAP;
> + bind.bind.pat_index = intel_get_pat_idx_wb(fd);
> bind.num_syncs = 1;
> bind.syncs = (uintptr_t)sync;
>
> --
> 2.25.1
More information about the igt-dev
mailing list