Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe: Adjust batchbuffer space warning when creating a job

We should WARN (not BUG) when creating a job if the batchbuffer does not
have sufficient space and padding. The hardware prefetch requirements
should also be considered.

Link: https://lore.kernel.org/r/20230329173334.4015124-3-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

authored by

Matt Roper and committed by
Rodrigo Vivi
9b36f7af 681818fd

+2 -2
+2 -2
drivers/gpu/drm/xe/xe_bb.c
··· 63 63 { 64 64 u32 size = drm_suballoc_size(bb->bo); 65 65 66 - XE_BUG_ON((bb->len * 4 + 1) > size); 67 - 68 66 bb->cs[bb->len++] = MI_BATCH_BUFFER_END; 67 + 68 + WARN_ON(bb->len * 4 + bb_prefetch(kernel_eng->gt) > size); 69 69 70 70 xe_sa_bo_flush_write(bb->bo); 71 71