From: Nirmoy Das <nirmoy.das@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/xe/bb: assert width in xe_bb_create_job()
Date: Wed, 20 Mar 2024 13:49:07 +0100 [thread overview]
Message-ID: <55814104-0849-4a64-875a-dac33d0ac9d1@intel.com> (raw)
In-Reply-To: <20240320112730.219854-3-matthew.auld@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
On 3/20/2024 12:27 PM, Matthew Auld wrote:
> 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>
Reviewed-by: 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);
> }
>
[-- Attachment #2: Type: text/html, Size: 1934 bytes --]
prev parent reply other threads:[~2024-03-20 12:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Nirmoy Das [this message]
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=55814104-0849-4a64-875a-dac33d0ac9d1@intel.com \
--to=nirmoy.das@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@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