Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915/gem i915: Restore uao_se...



details:   https://anonhg.NetBSD.org/src/rev/cdfd4b93280b
branches:  trunk
changeset: 1029171:cdfd4b93280b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Dec 24 15:07:47 2021 +0000

description:
i915: Restore uao_set_pgfl for i915 gem objects, lost in the merge.

Needed to ensure we allocate paddrs that the GPU can cope with.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r 8f5a5403ad0c -r cdfd4b93280b sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c  Fri Dec 24 11:19:55 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c  Fri Dec 24 15:07:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_shmem.c,v 1.11 2021/12/21 12:00:40 tnn Exp $  */
+/*     $NetBSD: i915_gem_shmem.c,v 1.12 2021/12/24 15:07:47 riastradh Exp $    */
 
 /*
  * SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_shmem.c,v 1.11 2021/12/21 12:00:40 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_shmem.c,v 1.12 2021/12/24 15:07:47 riastradh Exp $");
 
 #include <linux/pagevec.h>
 #include <linux/swap.h>
@@ -572,6 +572,11 @@
        if (ret)
                goto fail;
 
+#ifdef __NetBSD__
+       __USE(mapping);
+       __USE(mask);
+       uao_set_pgfl(obj->base.filp, i915->ggtt.pgfl);
+#else
        mask = GFP_HIGHUSER | __GFP_RECLAIMABLE;
        if (IS_I965GM(i915) || IS_I965G(i915)) {
                /* 965gm cannot relocate objects above 4GiB. */
@@ -579,9 +584,6 @@
                mask |= __GFP_DMA32;
        }
 
-#ifdef __NetBSD__
-       __USE(mapping);
-#else
        mapping = obj->base.filp->f_mapping;
        mapping_set_gfp_mask(mapping, mask);
        GEM_BUG_ON(!(mapping_gfp_mask(mapping) & __GFP_RECLAIM));



Home | Main Index | Thread Index | Old Index