if (ret)
                return ret;
 
+       i915_gem_object_flush_gtt_write_domain(obj);
+
        /* If we're not in the cpu read domain, set ourself into the gtt
         * read domain and manually flush cachelines (if required). This
         * optimizes for the case when the gpu will dirty the data
        if (ret)
                return ret;
 
+       i915_gem_object_flush_gtt_write_domain(obj);
+
        /* If we're not in the cpu write domain, set ourself into the
         * gtt write domain and manually flush cachelines (as required).
         * This optimizes for the case when the gpu will use the data