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 Mark pages dirty after u...
details: https://anonhg.NetBSD.org/src/rev/9a7821113de3
branches: trunk
changeset: 336535:9a7821113de3
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Mar 05 01:04:51 2015 +0000
description:
Mark pages dirty after use for write in the aperture (`GTT').
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r eb70dffbeb66 -r 9a7821113de3 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Thu Mar 05 00:55:34 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Thu Mar 05 01:04:51 2015 +0000
@@ -380,6 +380,7 @@
kunmap_atomic(src);
#ifdef __NetBSD__
+ /* XXX mark page accessed */
uvm_obj_unwirepages(obj->base.gemo_shm_uao, i*PAGE_SIZE,
(i + 1)*PAGE_SIZE);
#else
@@ -2421,6 +2422,7 @@
i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj)
{
struct drm_device *const dev = obj->base.dev;
+ struct vm_page *page;
int ret;
/* XXX Cargo-culted from the Linux code. */
@@ -2437,7 +2439,15 @@
if (i915_gem_object_needs_bit17_swizzle(obj))
i915_gem_object_save_bit_17_swizzle(obj);
- /* XXX Maintain dirty flag? */
+ if (obj->madv == I915_MADV_DONTNEED)
+ obj->dirty = 0;
+
+ if (obj->dirty) {
+ TAILQ_FOREACH(page, &obj->igo_pageq, pageq.queue) {
+ page->flags &= ~PG_CLEAN;
+ /* XXX mark page accessed */
+ }
+ }
bus_dmamap_destroy(dev->dmat, obj->igo_dmamap);
bus_dmamem_unwire_uvm_object(dev->dmat, obj->base.gemo_shm_uao, 0,
Home |
Main Index |
Thread Index |
Old Index