[PATCH v2 07/32] drm/xe/vm: Add an identifier in xe_vma_ops for svm prefetch
Matthew Brost
matthew.brost at intel.com
Thu Apr 17 02:53:06 UTC 2025
On Mon, Apr 07, 2025 at 03:46:54PM +0530, Himal Prasad Ghimiray wrote:
> Add a flag in xe_vma_ops to determine whether it has svm prefetch ops or
> not.
>
> v2:
> - s/false/0 (Matthew Brost)
>
> Suggested-by: Matthew Brost <matthew.brost at intel.com>
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
> ---
> drivers/gpu/drm/xe/xe_vm.c | 1 +
> drivers/gpu/drm/xe/xe_vm_types.h | 3 +++
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 4d215c55a778..b1f1e85d26f7 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -3240,6 +3240,7 @@ static void xe_vma_ops_init(struct xe_vma_ops *vops, struct xe_vm *vm,
> vops->q = q;
> vops->syncs = syncs;
> vops->num_syncs = num_syncs;
> + vops->flags = 0;
> }
>
> static int xe_vm_bind_ioctl_validate_bo(struct xe_device *xe, struct xe_bo *bo,
> diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h
> index ae0bcefdbfcd..d3c1209348e9 100644
> --- a/drivers/gpu/drm/xe/xe_vm_types.h
> +++ b/drivers/gpu/drm/xe/xe_vm_types.h
> @@ -445,6 +445,9 @@ struct xe_vma_ops {
> u32 num_syncs;
> /** @pt_update_ops: page table update operations */
> struct xe_vm_pgtable_update_ops pt_update_ops[XE_MAX_TILES_PER_DEVICE];
> + /** @flag: signify the properties within xe_vma_ops*/
> +#define XE_VMA_OPS_HAS_SVM_PREFETCH BIT(0)
Maybe s/XE_VMA_OPS_HAS_SVM_PREFETCH/XE_VMA_OPS_FLAG_HAS_SVM_PREFETCH ?
Either way:
Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> + u32 flags;
> #ifdef TEST_VM_OPS_ERROR
> /** @inject_error: inject error to test error handling */
> bool inject_error;
> --
> 2.34.1
>
More information about the Intel-xe
mailing list