[PATCH 1/2] drm/xe/bb: assert width in xe_bb_create_job()

Nirmoy Das nirmoy.das at intel.com
Wed Mar 20 12:49:07 UTC 2024


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 at intel.com>
> Cc: Nirmoy Das<nirmoy.das at intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das at 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);
>   }
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-xe/attachments/20240320/c9885419/attachment.htm>


More information about the Intel-xe mailing list