summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2024-03-20 11:27:32 +0000
committerMatthew Auld <matthew.auld@intel.com>2024-03-21 08:29:31 +0000
commitee3b1e31d55cefe8d7995c6bbdfc028a068576d8 (patch)
tree19aa41e8b60204ad8b01fe6199d0156dca584788
parent1008368e1c7e36bdec01b3cce1e76606dc3ad46f (diff)
downloadlinux-ee3b1e31d55cefe8d7995c6bbdfc028a068576d8.tar.gz
linux-ee3b1e31d55cefe8d7995c6bbdfc028a068576d8.tar.bz2
linux-ee3b1e31d55cefe8d7995c6bbdfc028a068576d8.zip
drm/xe/bb: assert width in xe_bb_create_migration_job()
The q->width should always be exactly one here for migration queue/vm. The width will anyway be overridden later since we need to emit two jumps for special migration jobs. Enforce that here to ensure caller is not doing something strange. While here also convert to the helper to determine if the queue is migration based. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240320112730.219854-4-matthew.auld@intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_bb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_bb.c b/drivers/gpu/drm/xe/xe_bb.c
index a35e0781b7b9..541361caff3b 100644
--- a/drivers/gpu/drm/xe/xe_bb.c
+++ b/drivers/gpu/drm/xe/xe_bb.c
@@ -86,7 +86,8 @@ struct xe_sched_job *xe_bb_create_migration_job(struct xe_exec_queue *q,
};
xe_gt_assert(q->gt, second_idx <= bb->len);
- xe_gt_assert(q->gt, q->vm->flags & XE_VM_FLAG_MIGRATION);
+ xe_gt_assert(q->gt, xe_sched_job_is_migration(q));
+ xe_gt_assert(q->gt, q->width == 1);
return __xe_bb_create_job(q, bb, addr);
}