diff options
author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2023-06-29 23:51:33 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:35:07 +0300 |
commit | b747411964cd9011e05f4b9f5624be9ed71532c4 (patch) | |
tree | 2f95e22042a48783193eaf9098e9d8cfb593f5e6 /drivers/gpu/drm/xe/xe_migrate.c | |
parent | c0ab10ee2ee6a2c423f95154e0842a1b19a4c13b (diff) | |
download | linux-b747411964cd9011e05f4b9f5624be9ed71532c4.tar.xz |
drm/xe: Make page-table updates using the default engine happen in order
If the default engine m->eng was used, there is no check for idle and
a cpu page-table update may thus happen in parallel with a gpu one.
Don't allow CPU page-table updates with the default engine until
the engine is idle.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230629205134.111849-2-thomas.hellstrom@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_migrate.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_migrate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c index a62bd7ec8a42..be98690f2bc9 100644 --- a/drivers/gpu/drm/xe/xe_migrate.c +++ b/drivers/gpu/drm/xe/xe_migrate.c @@ -1160,9 +1160,10 @@ xe_migrate_update_pgtables(struct xe_migrate *m, int err = 0; bool usm = !eng && xe->info.supports_usm; bool first_munmap_rebind = vma && vma->first_munmap_rebind; + struct xe_engine *eng_override = !eng ? m->eng : eng; /* Use the CPU if no in syncs and engine is idle */ - if (no_in_syncs(syncs, num_syncs) && (!eng || xe_engine_is_idle(eng))) { + if (no_in_syncs(syncs, num_syncs) && xe_engine_is_idle(eng_override)) { fence = xe_migrate_update_pgtables_cpu(m, vm, bo, updates, num_updates, first_munmap_rebind, |