@@ -879,6 +879,8 @@ struct drm_i915_gem_object {
* reaches 0, dev_priv->pending_flip_queue will be woken up.
*/
atomic_t pending_flip;
+
+ atomic_t always_cpu_dirty;
};
#define to_intel_bo(x) container_of(x, struct drm_i915_gem_object, base)
@@ -201,6 +201,10 @@ i915_gem_object_set_to_gpu_domain(struct drm_i915_gem_object *obj,
cd->invalidate_domains |= invalidate_domains;
cd->flush_domains |= flush_domains;
+
+ if (atomic_read(&obj->always_cpu_dirty))
+ cd->flush_domains |= I915_GEM_DOMAIN_CPU;
+
if (flush_domains & I915_GEM_GPU_DOMAINS)
cd->flush_rings |= obj->ring->id;
if (invalidate_domains & I915_GEM_GPU_DOMAINS)
Signed-off-by: Ben Widawsky <ben@bwidawsk.net> --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++++ 2 files changed, 6 insertions(+), 0 deletions(-)