NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/56591: Assertion failure in i915: panic: kernel diagnostic assertion "!(vma->exec_flags != &eb->flags[i])" failed



The following reply was made to PR kern/56591; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: nbgnats%m-squa.red@localhost
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/56591: Assertion failure in i915: panic: kernel diagnostic assertion "!(vma->exec_flags != &eb->flags[i])" failed
Date: Tue, 6 Sep 2022 01:44:27 +0000

 This is a multi-part message in MIME format.
 --=_La7nkjIJilZyzQ04m7iYdJZjSuvrF8DG
 
 I hit this on my own machine tonight and tracked it down to a
 candidate error branch.  Can you please try the attached patch?
 
 If you ever see the message
 
 eb_add_vma: lucky day, err=N
 
 or the message
 
 eb_move_to_gpu: lucky day, err=N
 
 this means my hypothesis may be correct that this was the culprit.
 (If you see `eb_add_vma: double-lucky day', then I guessed something
 else right but I don't really know what it means.)
 
 --=_La7nkjIJilZyzQ04m7iYdJZjSuvrF8DG
 Content-Type: text/plain; charset="ISO-8859-1"; name="i915ebvmafail"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="i915ebvmafail.patch"
 
 From c90496e2508ca33a55beedfe874fa29c75411815 Mon Sep 17 00:00:00 2001
 From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
 Date: Tue, 6 Sep 2022 01:22:47 +0000
 Subject: [PATCH] WIP: i915: Fix error branch of execbuffer vma pinning.
 
 PR kern/56591
 ---
  .../bsd/drm2/dist/drm/i915/gem/i915_gem_execbuffer.c  | 11 ++++++++++-
  1 file changed, 10 insertions(+), 1 deletion(-)
 
 diff --git a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_execbuffer.c =
 b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_execbuffer.c
 index 98da9252d96b..f1d712fd7de8 100644
 --- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_execbuffer.c
 +++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_execbuffer.c
 @@ -546,8 +546,15 @@ eb_add_vma(struct i915_execbuffer *eb,
  		list_add_tail(&vma->exec_link, &eb->unbound);
  		if (drm_mm_node_allocated(&vma->node))
  			err =3D i915_vma_unbind(vma);
 -		if (unlikely(err))
 +		if (unlikely(err)) {
 +			printf("%s: lucky day, err=3D%d\n", __func__, err);
  			vma->exec_flags =3D NULL;
 +			if (i =3D=3D batch_idx) {
 +				printf("%s: double-lucky day\n", __func__);
 +				eb->batch =3D NULL;
 +			}
 +			eb->vma[i] =3D NULL;
 +		}
  	}
  	return err;
  }
 @@ -1906,6 +1913,8 @@ static int eb_move_to_gpu(struct i915_execbuffer *eb)
 =20
  		__eb_unreserve_vma(vma, flags);
  		vma->exec_flags =3D NULL;
 +		printf("%s: lucky day, err=3D%d\n", __func__, err);
 +		eb->vma[i] =3D NULL;
 =20
  		if (unlikely(flags & __EXEC_OBJECT_HAS_REF))
  			i915_vma_put(vma);
 
 --=_La7nkjIJilZyzQ04m7iYdJZjSuvrF8DG--
 


Home | Main Index | Thread Index | Old Index