]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/gpu/drm/i915/intel_ringbuffer.c
drm/i915: Mark the context state as dirty/written
[mirror_ubuntu-bionic-kernel.git] / drivers / gpu / drm / i915 / intel_ringbuffer.c
index 63cf9d2b52273dff6bb9f2eabab9b0f7ff4c83af..f7e5c287e811821d2abf58902d2d8c4ab7e6cf0c 100644 (file)
@@ -1364,12 +1364,13 @@ static int context_pin(struct i915_gem_context *ctx)
        struct i915_vma *vma = ctx->engine[RCS].state;
        int ret;
 
-       /* Clear this page out of any CPU caches for coherent swap-in/out.
+       /*
+        * Clear this page out of any CPU caches for coherent swap-in/out.
         * We only want to do this on the first bind so that we do not stall
         * on an active context (which by nature is already on the GPU).
         */
        if (!(vma->flags & I915_VMA_GLOBAL_BIND)) {
-               ret = i915_gem_object_set_to_gtt_domain(vma->obj, false);
+               ret = i915_gem_object_set_to_gtt_domain(vma->obj, true);
                if (ret)
                        return ret;
        }
@@ -1446,7 +1447,6 @@ intel_ring_context_pin(struct intel_engine_cs *engine,
                if (ret)
                        goto err;
 
-               ce->state->obj->mm.dirty = true;
                ce->state->obj->pin_global++;
        }