Commit b670d815 authored by Eric Anholt's avatar Eric Anholt Committed by Dave Airlie

drm/i915: If interrupted while setting object domains, still emit the flush.

Otherwise, we would leave the objects in an inconsistent state, such as
write_domain == 0 but on the flushing list.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ce44b0ea
...@@ -1880,9 +1880,21 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, ...@@ -1880,9 +1880,21 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
ret = i915_gem_object_set_domain(obj, ret = i915_gem_object_set_domain(obj,
obj->pending_read_domains, obj->pending_read_domains,
obj->pending_write_domain); obj->pending_write_domain);
if (ret) if (ret) {
/* As we've partially updated domains on our buffers,
* we have to emit the flush we've accumulated
* before exiting, or we'll have broken the
* active/flushing/inactive invariants.
*
* We'll potentially have some things marked as
* being in write domains that they actually aren't,
* but that should be merely a minor performance loss.
*/
flush_domains = i915_gem_dev_set_domain(dev);
(void)i915_add_request(dev, flush_domains);
goto err; goto err;
} }
}
i915_verify_inactive(dev, __FILE__, __LINE__); i915_verify_inactive(dev, __FILE__, __LINE__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment