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: Mark shmem obj...
details: https://anonhg.NetBSD.org/src/rev/fce554940945
branches: trunk
changeset: 1028898:fce554940945
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:25:56 2021 +0000
description:
i915: Mark shmem object pages dirty if needed before unwiring them.
Unlikely to fix the graphics corruption we're seeing, though --
should be relevant only if we're swapping.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 5869c86c9ea1 -r fce554940945 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 Sun Dec 19 12:25:46 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_shmem.c Sun Dec 19 12:25:56 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_shmem.c,v 1.9 2021/12/19 11:57:03 riastradh Exp $ */
+/* $NetBSD: i915_gem_shmem.c,v 1.10 2021/12/19 12:25:56 riastradh Exp $ */
/*
* SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_shmem.c,v 1.9 2021/12/19 11:57:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_shmem.c,v 1.10 2021/12/19 12:25:56 riastradh Exp $");
#include <linux/pagevec.h>
#include <linux/swap.h>
@@ -352,6 +352,16 @@
#ifdef __NetBSD__
__USE(sgt_iter);
+ if (obj->mm.dirty) {
+ unsigned i;
+
+ rw_enter(obj->base.filp->vmobjlock, RW_WRITER);
+ for (i = 0; i < pages->sgl->sg_npgs; i++) {
+ uvm_pagemarkdirty(&pages->sgl->sg_pgs[i]->p_vmp,
+ UVM_PAGE_STATUS_DIRTY);
+ }
+ rw_exit(obj->base.filp->vmobjlock);
+ }
uvm_obj_unwirepages(obj->base.filp, 0, obj->base.size);
#else
mapping_clear_unevictable(file_inode(obj->base.filp)->i_mapping);
Home |
Main Index |
Thread Index |
Old Index