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 When moving an object to...



details:   https://anonhg.NetBSD.org/src/rev/07ca6638e4ba
branches:  trunk
changeset: 803567:07ca6638e4ba
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Nov 03 16:50:20 2014 +0000

description:
When moving an object to inactive, make sure that we first flush it from
the GTT domain in case it belonged there. Also, fix some compilation issues
when turning on WATCH_GTT and WATCH_LISTS, although this is a lost cause;
most of the code has rotted beyond repair.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r 71e3e4149f14 -r 07ca6638e4ba sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c    Mon Nov 03 13:04:12 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c    Mon Nov 03 16:50:20 2014 +0000
@@ -58,6 +58,7 @@
 #include <linux/time.h>
 #include <linux/err.h>
 #include <linux/bitops.h>
+#include <linux/printk.h>
 #include <asm/param.h>
 #include <asm/page.h>
 
@@ -2838,10 +2839,18 @@
 static void
 i915_gem_object_move_to_inactive(struct drm_i915_gem_object *obj)
 {
-       struct drm_i915_private *dev_priv = obj->base.dev->dev_private;
+       struct drm_device *dev = obj->base.dev;
+       struct drm_i915_private *dev_priv = dev->dev_private;
        struct i915_address_space *vm;
        struct i915_vma *vma;
 
+       if ((obj->base.write_domain & I915_GEM_DOMAIN_GTT) != 0) {
+#if 0
+               printk(KERN_ERR "%s: %p 0x%x flushing gtt\n", __func__, obj,
+                       obj->base.write_domain);
+#endif
+               i915_gem_object_flush_gtt_write_domain(obj);
+       }
        BUG_ON(obj->base.write_domain & ~I915_GEM_GPU_DOMAINS);
        BUG_ON(!obj->active);
 
@@ -3948,7 +3957,7 @@
        struct drm_i915_gem_object *obj;
        int err = 0;
 
-       list_for_each_entry(obj, &dev_priv->mm.gtt_list, global_list) {
+       list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
                if (obj->gtt_space == NULL) {
                        printk(KERN_ERR "object found on GTT list with no space reserved\n");
                        err++;



Home | Main Index | Thread Index | Old Index