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 Restore mmap ioctl versi...



details:   https://anonhg.NetBSD.org/src/rev/7a0875c24429
branches:  trunk
changeset: 1028291:7a0875c24429
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 10:24:52 2021 +0000

description:
Restore mmap ioctl version ABI hack that was lost in merge.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c |  10 ++++++++--
 sys/external/bsd/drm2/dist/drm/i915/i915_getparam.c     |   7 +++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diffs (58 lines):

diff -r 4428c35da6dd -r 7a0875c24429 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c   Sun Dec 19 10:24:33 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c   Sun Dec 19 10:24:52 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_mman.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $      */
+/*     $NetBSD: i915_gem_mman.c,v 1.3 2021/12/19 10:24:52 riastradh Exp $      */
 
 /*
  * SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_mman.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_mman.c,v 1.3 2021/12/19 10:24:52 riastradh Exp $");
 
 #include <linux/anon_inodes.h>
 #include <linux/mman.h>
@@ -75,6 +75,12 @@
        if (!obj)
                return -ENOENT;
 
+#ifdef __NetBSD__
+       struct drm_i915_private *i915 = to_i915(obj->base.dev);
+       if (dev->quirks & QUIRK_NETBSD_VERSION_CALLED)
+               args->flags = 0;
+#endif
+
        /* prime objects have no backing filp to GEM mmap
         * pages from.
         */
diff -r 4428c35da6dd -r 7a0875c24429 sys/external/bsd/drm2/dist/drm/i915/i915_getparam.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_getparam.c       Sun Dec 19 10:24:33 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_getparam.c       Sun Dec 19 10:24:52 2021 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: i915_getparam.c,v 1.2 2021/12/18 23:45:28 riastradh Exp $      */
+/*     $NetBSD: i915_getparam.c,v 1.3 2021/12/19 10:24:52 riastradh Exp $      */
 
 /*
  * SPDX-License-Identifier: MIT
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_getparam.c,v 1.2 2021/12/18 23:45:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_getparam.c,v 1.3 2021/12/19 10:24:52 riastradh Exp $");
 
 #include "gem/i915_gem_mman.h"
 #include "gt/intel_engine_user.h"
@@ -116,6 +116,9 @@
                break;
 
        case I915_PARAM_MMAP_VERSION:
+#ifdef __NetBSD__
+               dev_priv->quirks |= QUIRK_NETBSD_VERSION_CALLED;
+#endif
                /* Remember to bump this if the version changes! */
        case I915_PARAM_HAS_GEM:
        case I915_PARAM_HAS_PAGEFLIPPING:



Home | Main Index | Thread Index | Old Index