aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9fd28ebe0aa3..3fe108b7e2fa 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1880,8 +1880,20 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
1880 ret = i915_gem_object_set_domain(obj, 1880 ret = i915_gem_object_set_domain(obj,
1881 obj->pending_read_domains, 1881 obj->pending_read_domains,
1882 obj->pending_write_domain); 1882 obj->pending_write_domain);
1883 if (ret) 1883 if (ret) {
1884 /* As we've partially updated domains on our buffers,
1885 * we have to emit the flush we've accumulated
1886 * before exiting, or we'll have broken the
1887 * active/flushing/inactive invariants.
1888 *
1889 * We'll potentially have some things marked as
1890 * being in write domains that they actually aren't,
1891 * but that should be merely a minor performance loss.
1892 */
1893 flush_domains = i915_gem_dev_set_domain(dev);
1894 (void)i915_add_request(dev, flush_domains);
1884 goto err; 1895 goto err;
1896 }
1885 } 1897 }
1886 1898
1887 i915_verify_inactive(dev, __FILE__, __LINE__); 1899 i915_verify_inactive(dev, __FILE__, __LINE__);