Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/xe/bb: assert width in xe_bb_create_job()
@ 2024-03-20 11:27 Matthew Auld
  2024-03-20 11:27 ` [PATCH 2/2] drm/xe/bb: assert width in xe_bb_create_migration_job() Matthew Auld
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Matthew Auld @ 2024-03-20 11:27 UTC (permalink / raw)
  To: intel-xe; +Cc: Nirmoy Das

The queue width will determine the number of batch buffer emitted into
the ring. In the case of xe_bb_create_job() we pass exactly one batch
address, therefore add an assert for the width to make sure we don't go
out of bounds. 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>
---
 drivers/gpu/drm/xe/xe_bb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_bb.c b/drivers/gpu/drm/xe/xe_bb.c
index 7c124475c428..a35e0781b7b9 100644
--- a/drivers/gpu/drm/xe/xe_bb.c
+++ b/drivers/gpu/drm/xe/xe_bb.c
@@ -96,7 +96,8 @@ struct xe_sched_job *xe_bb_create_job(struct xe_exec_queue *q,
 {
 	u64 addr = xe_sa_bo_gpu_addr(bb->bo);
 
-	xe_gt_assert(q->gt, !(q->vm && 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);
 }
 
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-20 12:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-20 11:27 [PATCH 1/2] drm/xe/bb: assert width in xe_bb_create_job() Matthew Auld
2024-03-20 11:27 ` [PATCH 2/2] drm/xe/bb: assert width in xe_bb_create_migration_job() Matthew Auld
2024-03-20 12:50   ` Nirmoy Das
2024-03-20 11:58 ` ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe/bb: assert width in xe_bb_create_job() Patchwork
2024-03-20 11:59 ` ✓ CI.checkpatch: " Patchwork
2024-03-20 11:59 ` ✓ CI.KUnit: " Patchwork
2024-03-20 12:10 ` ✓ CI.Build: " Patchwork
2024-03-20 12:13 ` ✓ CI.Hooks: " Patchwork
2024-03-20 12:14 ` ✓ CI.checksparse: " Patchwork
2024-03-20 12:39 ` ✓ CI.BAT: " Patchwork
2024-03-20 12:49 ` [PATCH 1/2] " Nirmoy Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox