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 i915: Must unmake vma no...
details: https://anonhg.NetBSD.org/src/rev/a053317bf265
branches: trunk
changeset: 1028766:a053317bf265
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:58:41 2021 +0000
description:
i915: Must unmake vma nodes we have made.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c | 12 +++++++-----
sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_object.c | 5 +++--
sys/external/bsd/drm2/dist/drm/i915/i915_request.c | 11 +++++++----
3 files changed, 17 insertions(+), 11 deletions(-)
diffs (106 lines):
diff -r 3aa4649ac76a -r a053317bf265 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 11:58:32 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c Sun Dec 19 11:58:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_mman.c,v 1.10 2021/12/19 11:58:16 riastradh Exp $ */
+/* $NetBSD: i915_gem_mman.c,v 1.11 2021/12/19 11:58:41 riastradh Exp $ */
/*
* SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_mman.c,v 1.10 2021/12/19 11:58:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_mman.c,v 1.11 2021/12/19 11:58:41 riastradh Exp $");
#include <linux/anon_inodes.h>
#include <linux/mman.h>
@@ -785,8 +785,6 @@
spin_lock(&obj->mmo.lock);
if (obj->mmo.offsets[mmo->mmap_type]) {
- drm_vma_offset_remove(obj->base.dev->vma_offset_manager,
- &mmo->vma_node);
to_free = mmo;
mmo = obj->mmo.offsets[mmo->mmap_type];
} else {
@@ -794,8 +792,12 @@
}
spin_unlock(&obj->mmo.lock);
- if (to_free)
+ if (to_free) {
+ drm_vma_offset_remove(obj->base.dev->vma_offset_manager,
+ &to_free->vma_node);
+ drm_vma_node_destroy(&to_free->vma_node);
kfree(to_free);
+ }
return mmo;
#else
diff -r 3aa4649ac76a -r a053317bf265 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_object.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_object.c Sun Dec 19 11:58:32 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_object.c Sun Dec 19 11:58:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_object.c,v 1.5 2021/12/19 11:37:41 riastradh Exp $ */
+/* $NetBSD: i915_gem_object.c,v 1.6 2021/12/19 11:58:41 riastradh Exp $ */
/*
* Copyright © 2017 Intel Corporation
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_object.c,v 1.5 2021/12/19 11:37:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_object.c,v 1.6 2021/12/19 11:58:41 riastradh Exp $");
#include <linux/bitmap.h>
#include <linux/sched/mm.h>
@@ -228,6 +228,7 @@
continue;
drm_vma_offset_remove(obj->base.dev->vma_offset_manager,
&mmo->vma_node);
+ drm_vma_node_destroy(&mmo->vma_node);
kfree(mmo);
}
memset(obj->mmo.offsets, 0, sizeof(obj->mmo.offsets));
diff -r 3aa4649ac76a -r a053317bf265 sys/external/bsd/drm2/dist/drm/i915/i915_request.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_request.c Sun Dec 19 11:58:32 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_request.c Sun Dec 19 11:58:41 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_request.c,v 1.6 2021/12/19 11:58:32 riastradh Exp $ */
+/* $NetBSD: i915_request.c,v 1.7 2021/12/19 11:58:41 riastradh Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.6 2021/12/19 11:58:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_request.c,v 1.7 2021/12/19 11:58:41 riastradh Exp $");
#include <linux/dma-fence-array.h>
#include <linux/irq_work.h>
@@ -1597,15 +1597,18 @@
if (dma_fence_add_callback(&rq->fence, &wait.cb, request_wait_wake))
goto out;
spin_lock(rq->fence.lock);
+#define C (i915_request_completed(rq) ? 1 : \
+ (intel_engine_flush_submission(rq->engine), 0))
if (flags & I915_WAIT_INTERRUPTIBLE) {
DRM_SPIN_TIMED_WAIT_UNTIL(timeout, &wait.wq,
rq->fence.lock, timeout,
- i915_request_completed(rq));
+ C);
} else {
DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(timeout, &wait.wq,
rq->fence.lock, timeout,
- i915_request_completed(rq));
+ C);
}
+#undef C
if (timeout > 0) /* succeeded before timeout */
dma_fence_signal_locked(&rq->fence);
spin_unlock(rq->fence.lock);
Home |
Main Index |
Thread Index |
Old Index