Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Nirmoy Das <nirmoy.das@intel.com>
Subject: [PATCH 1/2] drm/xe/bb: assert width in xe_bb_create_job()
Date: Wed, 20 Mar 2024 11:27:31 +0000	[thread overview]
Message-ID: <20240320112730.219854-3-matthew.auld@intel.com> (raw)

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


             reply	other threads:[~2024-03-20 11:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 11:27 Matthew Auld [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240320112730.219854-3-matthew.auld@intel.com \
    --to=matthew.auld@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=nirmoy.das@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox