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 Apply patch from kamil@: vmob...
details: https://anonhg.NetBSD.org/src/rev/fd51b490afcd
branches: trunk
changeset: 968465:fd51b490afcd
user: ad <ad%NetBSD.org@localhost>
date: Fri Jan 17 19:56:49 2020 +0000
description:
Apply patch from kamil@: vmobjlock needs to be held for uvm_pagemarkdirty().
diffstat:
sys/external/bsd/drm2/dist/drm/drm_gem.c | 6 ++++--
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 6 ++++--
sys/external/bsd/drm2/dist/drm/i915/i915_gem_fence.c | 6 ++++--
3 files changed, 12 insertions(+), 6 deletions(-)
diffs (88 lines):
diff -r 43f17eb27342 -r fd51b490afcd sys/external/bsd/drm2/dist/drm/drm_gem.c
--- a/sys/external/bsd/drm2/dist/drm/drm_gem.c Fri Jan 17 19:44:12 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_gem.c Fri Jan 17 19:56:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_gem.c,v 1.11 2020/01/15 17:55:43 ad Exp $ */
+/* $NetBSD: drm_gem.c,v 1.12 2020/01/17 19:56:49 ad Exp $ */
/*
* Copyright © 2008 Intel Corporation
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_gem.c,v 1.11 2020/01/15 17:55:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_gem.c,v 1.12 2020/01/17 19:56:49 ad Exp $");
#include <linux/types.h>
#include <linux/slab.h>
@@ -613,8 +613,10 @@
for (i = 0; i < (obj->size >> PAGE_SHIFT); i++) {
if (dirty) {
+ mutex_enter(obj->filp->vmobjlock);
uvm_pagemarkdirty(&pages[i]->p_vmp,
UVM_PAGE_STATUS_DIRTY);
+ mutex_exit(obj->filp->vmobjlock);
}
}
diff -r 43f17eb27342 -r fd51b490afcd sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Fri Jan 17 19:44:12 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Fri Jan 17 19:56:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem.c,v 1.55 2020/01/15 17:55:43 ad Exp $ */
+/* $NetBSD: i915_gem.c,v 1.56 2020/01/17 19:56:50 ad Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.55 2020/01/15 17:55:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem.c,v 1.56 2020/01/17 19:56:50 ad Exp $");
#ifdef __NetBSD__
#if 0 /* XXX uvmhist option? */
@@ -2643,10 +2643,12 @@
obj->dirty = 0;
if (obj->dirty) {
+ mutex_enter(obj->base.filp->vmobjlock);
TAILQ_FOREACH(page, &obj->pageq, pageq.queue) {
uvm_pagemarkdirty(page, UVM_PAGE_STATUS_DIRTY);
/* XXX mark page accessed */
}
+ mutex_exit(obj->base.filp->vmobjlock);
}
obj->dirty = 0;
diff -r 43f17eb27342 -r fd51b490afcd sys/external/bsd/drm2/dist/drm/i915/i915_gem_fence.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem_fence.c Fri Jan 17 19:44:12 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem_fence.c Fri Jan 17 19:56:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_fence.c,v 1.6 2020/01/15 17:55:43 ad Exp $ */
+/* $NetBSD: i915_gem_fence.c,v 1.7 2020/01/17 19:56:50 ad Exp $ */
/*
* Copyright © 2008-2015 Intel Corporation
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_fence.c,v 1.6 2020/01/15 17:55:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_fence.c,v 1.7 2020/01/17 19:56:50 ad Exp $");
#include <drm/drmP.h>
#include <drm/i915_drm.h>
@@ -769,7 +769,9 @@
(test_bit(i, obj->bit_17) != 0)) {
i915_gem_swizzle_page(container_of(page, struct page,
p_vmp));
+ mutex_enter(obj->base.filp->vmobjlock);
uvm_pagemarkdirty(page, UVM_PAGE_STATUS_DIRTY);
+ mutex_exit(obj->base.filp->vmobjlock);
}
i += 1;
}
Home |
Main Index |
Thread Index |
Old Index