[PATCH v4 18/33] drm/xe: Enable CPU address mirror uAPI
Thomas Hellström
thomas.hellstrom at linux.intel.com
Fri Feb 7 13:02:47 UTC 2025
On Wed, 2025-01-29 at 11:51 -0800, Matthew Brost wrote:
> Support for CPU address mirror bindings in SRAM fully in place,
> enable the
> implementation.
>
> v3:
> - s/system allocator/CPU address mirror (Thomas)
>
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>
> Reviewed-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
> ---
> drivers/gpu/drm/xe/xe_svm.c | 10 ++++++++++
> drivers/gpu/drm/xe/xe_vm.c | 6 ------
> 2 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_svm.c
> b/drivers/gpu/drm/xe/xe_svm.c
> index 56ece53b2069..ee150139470f 100644
> --- a/drivers/gpu/drm/xe/xe_svm.c
> +++ b/drivers/gpu/drm/xe/xe_svm.c
> @@ -429,6 +429,16 @@ int xe_svm_handle_pagefault(struct xe_vm *vm,
> struct xe_vma *vma,
> return err;
> }
>
> +/**
> + * xe_svm_has_mapping() - SVM has mappings
> + * @vm: The VM.
> + * @start: Start address.
> + * @end: End address.
> + *
> + * Check if an address range has SVM mappings.
> + *
> + * Return: True is address range has a SVM mapping, False otherwise
> + */
> bool xe_svm_has_mapping(struct xe_vm *vm, u64 start, u64 end)
Ah, the kerneldoc here should probably go in the previous patch.
/Thomas
> {
> return drm_gpusvm_has_mapping(&vm->svm.gpusvm, start, end);
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index d8c78ecd54ec..3ac03e0dc41b 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -3020,12 +3020,6 @@ static int vm_bind_ioctl_check_args(struct
> xe_device *xe, struct xe_vm *vm,
> u16 pat_index = (*bind_ops)[i].pat_index;
> u16 coh_mode;
>
> - /* FIXME: Disabling CPU address mirror for now */
> - if (XE_IOCTL_DBG(xe, is_cpu_addr_mirror)) {
> - err = -EOPNOTSUPP;
> - goto free_bind_ops;
> - }
> -
> if (XE_IOCTL_DBG(xe, is_cpu_addr_mirror &&
> !xe_vm_in_fault_mode(vm))) {
> err = -EINVAL;
More information about the dri-devel
mailing list