drm/xe/bb: assert width in xe_bb_create_job()
authorMatthew Auld <matthew.auld@intel.com>
Wed, 20 Mar 2024 11:27:31 +0000 (11:27 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Thu, 21 Mar 2024 08:29:30 +0000 (08:29 +0000)
commit1008368e1c7e36bdec01b3cce1e76606dc3ad46f
treecfbd516a6a0971f0c2405df17e014691fb968901
parent4c15a6dcee20951ea619eca26e249f8f13275224
drm/xe/bb: assert width in xe_bb_create_job()

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>
Link: https://patchwork.freedesktop.org/patch/msgid/20240320112730.219854-3-matthew.auld@intel.com
drivers/gpu/drm/xe/xe_bb.c