NetBSD-Bugs archive

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

Re: kern/56571: i915drmkms regression (hangs) in -current



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

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: is%bnhb484.de@localhost
Cc: gnats-bugs%NetBSD.org@localhost, is%NetBSD.org@localhost
Subject: Re: kern/56571: i915drmkms regression (hangs) in -current
Date: Fri, 24 Dec 2021 13:00:02 +0000

 This is a multi-part message in MIME format.
 --=_La7nkjIJilZyzQ04m7iYdJZjSuvrF8DG
 
 Thanks, can you try the attached patch?
 
 --=_La7nkjIJilZyzQ04m7iYdJZjSuvrF8DG
 Content-Type: text/plain; charset="ISO-8859-1"; name="i915_pgfl"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="i915_pgfl.patch"
 
 From c1261a43ba79fbf3cf03ab3b39ae1aac94f060a4 Mon Sep 17 00:00:00 2001
 From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
 Date: Fri, 24 Dec 2021 12:56:08 +0000
 Subject: [PATCH] i915: Restore uao_set_pgfl for i915 gem objects.
 
 Needed to ensure we allocate paddrs that the GPU can cope with.
 ---
  sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c b/sys=
 /external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c
 index 67aad0c3010e..e98cf529d575 100644
 --- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c
 +++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c
 @@ -572,6 +572,11 @@ create_shmem(struct intel_memory_region *mem,
  	if (ret)
  		goto fail;
 =20
 +#ifdef __NetBSD__
 +	__USE(mapping);
 +	__USE(mask);
 +	uao_set_pgfl(obj->base.filp, i915->ggtt.pgfl);
 +#else
  	mask =3D GFP_HIGHUSER | __GFP_RECLAIMABLE;
  	if (IS_I965GM(i915) || IS_I965G(i915)) {
  		/* 965gm cannot relocate objects above 4GiB. */
 @@ -579,9 +584,6 @@ create_shmem(struct intel_memory_region *mem,
  		mask |=3D __GFP_DMA32;
  	}
 =20
 -#ifdef __NetBSD__
 -	__USE(mapping);
 -#else
  	mapping =3D obj->base.filp->f_mapping;
  	mapping_set_gfp_mask(mapping, mask);
  	GEM_BUG_ON(!(mapping_gfp_mask(mapping) & __GFP_RECLAIM));
 
 --=_La7nkjIJilZyzQ04m7iYdJZjSuvrF8DG--
 


Home | Main Index | Thread Index | Old Index