drm/xe: Include hardware prefetch buffer in batchbuffer allocations
authorMatt Roper <matthew.d.roper@intel.com>
Wed, 29 Mar 2023 17:33:32 +0000 (10:33 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:30:26 +0000 (18:30 -0500)
commit681818fdb97de821cc1ee6b81c7a09f3ef8fc96d
tree354f9e01bb464e14dd2a907cb870be6c06cec03e
parent3d4451d30f36ffe21f8c5eea7db9678330ee83c4
drm/xe: Include hardware prefetch buffer in batchbuffer allocations

The hardware prefetches several cachelines of data from batchbuffers
before they are parsed.  This prefetching only stops when the parser
encounters an MI_BATCH_BUFFER_END instruction (or a nested
MI_BATCH_BUFFER_START), so we must ensure that there is enough padding
at the end of the batchbuffer to prevent the prefetcher from running
past the end of the allocation and potentially faulting.

Bspec: 45717
Link: https://lore.kernel.org/r/20230329173334.4015124-2-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>
drivers/gpu/drm/xe/xe_bb.c