Re: [PATCH v3 25/25] drm/xe: Add modparam to enable / disable ULLS on migrate queue

Summers, Stuart
2026-03-05T22:59:32Z

On Fri, 2026-02-27 at 17:35 -0800, Matthew Brost wrote:
> Having modparam to enable / disable ULLS on migrate queue will help
> with
> quick experiments.

Can we do this in configfs instead?

Thanks,
Stuart

>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_debugfs.c      |  1 +
>  drivers/gpu/drm/xe/xe_defaults.h     |  1 +
>  drivers/gpu/drm/xe/xe_device.c       | 12 +++++++++---
>  drivers/gpu/drm/xe/xe_device_types.h |  5 +++++
>  drivers/gpu/drm/xe/xe_migrate.c      |  2 +-
>  drivers/gpu/drm/xe/xe_module.c       |  4 ++++
>  drivers/gpu/drm/xe/xe_module.h       |  1 +
>  7 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c
> b/drivers/gpu/drm/xe/xe_debugfs.c
> index 844cfafe1ec7..049389205b3f 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -85,6 +85,7 @@ static int info(struct seq_file *m, void *data)
>         drm_printf(&p, "tile_count %d\n", xe->info.tile_count);
>         drm_printf(&p, "vm_max_level %d\n", xe->info.vm_max_level);
>         drm_printf(&p, "force_execlist %s\n", str_yes_no(xe-
> >info.force_execlist));
> +       drm_printf(&p, "ulls_enable %s\n", str_yes_no(xe-
> >info.ulls_enable));
>         drm_printf(&p, "has_flat_ccs %s\n", str_yes_no(xe-
> >info.has_flat_ccs));
>         drm_printf(&p, "has_usm %s\n", str_yes_no(xe->info.has_usm));
>         drm_printf(&p, "skip_guc_pc %s\n", str_yes_no(xe-
> >info.skip_guc_pc));
> diff --git a/drivers/gpu/drm/xe/xe_defaults.h
> b/drivers/gpu/drm/xe/xe_defaults.h
> index c8ae1d5f3d60..299360546283 100644
> --- a/drivers/gpu/drm/xe/xe_defaults.h
> +++ b/drivers/gpu/drm/xe/xe_defaults.h
> @@ -14,6 +14,7 @@
>  #endif
>
>  #define
> XE_DEFAULT_PROBE_DISPLAY               IS_ENABLED(CONFIG_DRM_XE_DISPL
> AY)
> +#define XE_DEFAULT_ULLS_ENABLE                 true
>  #define XE_DEFAULT_VRAM_BAR_SIZE               0
>  #define
> XE_DEFAULT_FORCE_PROBE                 CONFIG_DRM_XE_FORCE_PROBE
>  #define XE_DEFAULT_MAX_VFS                     ~0
> diff --git a/drivers/gpu/drm/xe/xe_device.c
> b/drivers/gpu/drm/xe/xe_device.c
> index b7ad7f97e68c..18af003c95c5 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -437,6 +437,14 @@ static void xe_device_destroy(struct drm_device
> *dev, void *dummy)
>         ttm_device_fini(&xe->ttm);
>  }
>
> +static void xe_device_parse_modparam(struct xe_device *xe)
> +{
> +       xe->info.force_execlist = xe_modparam.force_execlist;
> +       xe->info.ulls_enable = xe_modparam.ulls_enable;
> +       xe->atomic_svm_timeslice_ms = 5;
> +       xe->min_run_period_lr_ms = 5;
> +}
> +
>  struct xe_device *xe_device_create(struct pci_dev *pdev,
>                                    const struct pci_device_id *ent)
>  {
> @@ -470,9 +478,7 @@ struct xe_device *xe_device_create(struct pci_dev
> *pdev,
>
>         xe->info.devid = pdev->device;
>         xe->info.revid = pdev->revision;
> -       xe->info.force_execlist = xe_modparam.force_execlist;
> -       xe->atomic_svm_timeslice_ms = 5;
> -       xe->min_run_period_lr_ms = 5;
> +       xe_device_parse_modparam(xe);
>
>         err = xe_irq_init(xe);
>         if (err)
> diff --git a/drivers/gpu/drm/xe/xe_device_types.h
> b/drivers/gpu/drm/xe/xe_device_types.h
> index b3737dfcc45c..a20ff1707227 100644
> --- a/drivers/gpu/drm/xe/xe_device_types.h
> +++ b/drivers/gpu/drm/xe/xe_device_types.h
> @@ -231,6 +231,11 @@ struct xe_device {
>                 u8 skip_pcode:1;
>                 /** @info.needs_shared_vf_gt_wq: needs shared GT WQ
> on VF */
>                 u8 needs_shared_vf_gt_wq:1;
> +               /**
> +                * @info.ulls_enable: Enable ULLS on migration queue
> in LR VM
> +                * open
> +                */
> +               u8 ulls_enable:1;
>         } info;
>
>         /** @wa_active: keep track of active workarounds */
> diff --git a/drivers/gpu/drm/xe/xe_migrate.c
> b/drivers/gpu/drm/xe/xe_migrate.c
> index 62f27868f56b..9f02e238e7c6 100644
> --- a/drivers/gpu/drm/xe/xe_migrate.c
> +++ b/drivers/gpu/drm/xe/xe_migrate.c
> @@ -447,7 +447,7 @@ void xe_migrate_ulls_enter(struct xe_migrate *m)
>
>         xe_assert(xe, xe->info.has_usm);
>
> -       if (!IS_DGFX(xe) || IS_SRIOV_VF(xe))
> +       if (!IS_DGFX(xe) || IS_SRIOV_VF(xe) || !xe->info.ulls_enable)
>                 return;
>
>  job_alloc:
> diff --git a/drivers/gpu/drm/xe/xe_module.c
> b/drivers/gpu/drm/xe/xe_module.c
> index 4cb578182912..bb4fb967aec9 100644
> --- a/drivers/gpu/drm/xe/xe_module.c
> +++ b/drivers/gpu/drm/xe/xe_module.c
> @@ -22,6 +22,7 @@
>
>  struct xe_modparam xe_modparam = {
>         .probe_display =        XE_DEFAULT_PROBE_DISPLAY,
> +       .ulls_enable =          XE_DEFAULT_ULLS_ENABLE,
>         .guc_log_level =        XE_DEFAULT_GUC_LOG_LEVEL,
>         .force_probe =          XE_DEFAULT_FORCE_PROBE,
>  #ifdef CONFIG_PCI_IOV
> @@ -45,6 +46,9 @@ MODULE_PARM_DESC(probe_display, "Probe display HW,
> otherwise it's left untouched
>                  "[default=" __stringify(XE_DEFAULT_PROBE_DISPLAY)
> "])");
>  #endif
>
> +module_param_named(ulls_enable, xe_modparam.ulls_enable, bool,
> 0444);
> +MODULE_PARM_DESC(ulls_enable, "Enable ULLS on migration queue if LR
> VM open (default: true)");
> +
>  module_param_named(vram_bar_size, xe_modparam.force_vram_bar_size,
> int, 0600);
>  MODULE_PARM_DESC(vram_bar_size, "Set the vram bar size in MiB
> (<0=disable-resize, 0=max-needed-size, >0=force-size "
>                  "[default=" __stringify(XE_DEFAULT_VRAM_BAR_SIZE)
> "])");
> diff --git a/drivers/gpu/drm/xe/xe_module.h
> b/drivers/gpu/drm/xe/xe_module.h
> index 79cb9639c0f3..f0220b694c40 100644
> --- a/drivers/gpu/drm/xe/xe_module.h
> +++ b/drivers/gpu/drm/xe/xe_module.h
> @@ -12,6 +12,7 @@
>  struct xe_modparam {
>         bool force_execlist;
>         bool probe_display;
> +       bool ulls_enable;
>         int force_vram_bar_size;
>         int guc_log_level;
>         char *guc_firmware_path;