[PATCH i-g-t v2 2/7] lib/xe_spin: account for prefetch
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Fri Jan 26 06:20:10 UTC 2024
On Thu, Jan 25, 2024 at 10:56:40AM +0000, Matthew Auld wrote:
> Xe2 expects an extra page after the batch to avoid prefetch hitting an
> invalid page. Not doing so can result in CAT errors.
>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> ---
> lib/xe/xe_spin.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/xe/xe_spin.c b/lib/xe/xe_spin.c
> index 243e97047..2c531e85e 100644
> --- a/lib/xe/xe_spin.c
> +++ b/lib/xe/xe_spin.c
> @@ -186,7 +186,7 @@ void xe_spin_end(struct xe_spin *spin)
> igt_spin_t *
> xe_spin_create(int fd, const struct igt_spin_factory *opt)
> {
> - size_t bo_size = xe_get_default_alignment(fd);
> + size_t bo_size = xe_bb_size(fd, SZ_4K);
> uint64_t ahnd = opt->ahnd, addr;
> struct igt_spin *spin;
> struct xe_spin *xe_spin;
> @@ -285,7 +285,7 @@ void xe_cork_init(int fd, struct drm_xe_engine_class_instance *hwe,
> struct xe_cork *cork)
> {
> uint64_t addr = xe_get_default_alignment(fd);
> - size_t bo_size = xe_get_default_alignment(fd);
> + size_t bo_size = xe_bb_size(fd, SZ_4K);
> uint32_t vm, bo, exec_queue, syncobj;
> struct xe_spin *spin;
> struct drm_xe_sync sync = {
> --
> 2.43.0
>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
--
Zbigniew
More information about the igt-dev
mailing list