]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/migrate: fix job lock assert
authorMatthew Auld <matthew.auld@intel.com>
Tue, 20 Jan 2026 11:06:11 +0000 (11:06 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 21 Jan 2026 10:07:21 +0000 (10:07 +0000)
We are meant to be checking the user vm for the bind queue, but actually
we are checking the migrate vm. For various reasons this is not
currently firing but this will likely change in the future.

Now that we have the user_vm attached to the bind queue, we can fix this
by directly checking that here.

Fixes: dba89840a920 ("drm/xe: Add GT TLB invalidation jobs")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Arvind Yadav <arvind.yadav@intel.com>
Link: https://patch.msgid.link/20260120110609.77958-4-matthew.auld@intel.com
drivers/gpu/drm/xe/xe_migrate.c

index 00eef41a9e369fd85050976f6714b51577c1d744..6e202428aac2ff39b1a158182b287f65d559fb6a 100644 (file)
@@ -2499,7 +2499,7 @@ void xe_migrate_job_lock(struct xe_migrate *m, struct xe_exec_queue *q)
        if (is_migrate)
                mutex_lock(&m->job_mutex);
        else
-               xe_vm_assert_held(q->vm);       /* User queues VM's should be locked */
+               xe_vm_assert_held(q->user_vm);  /* User queues VM's should be locked */
 }
 
 /**
@@ -2517,7 +2517,7 @@ void xe_migrate_job_unlock(struct xe_migrate *m, struct xe_exec_queue *q)
        if (is_migrate)
                mutex_unlock(&m->job_mutex);
        else
-               xe_vm_assert_held(q->vm);       /* User queues VM's should be locked */
+               xe_vm_assert_held(q->user_vm);  /* User queues VM's should be locked */
 }
 
 #if IS_ENABLED(CONFIG_PROVE_LOCKING)