summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-08-05 16:06:40 -0700
committerKeith Packard <keithp@keithp.com>2008-08-05 16:06:40 -0700
commitdc0546c87ffc6701802d6141810c24954274e1ac (patch)
tree498e63ad22528a60a2dcbf48b727b49849e47fef /linux-core
parentceb3d5e3834452f9d54f974b8066f90168467443 (diff)
[gem-intel] Retiring flush requests should clear flushed write_domains
When i915_gem_retire_request has a flush which matches an object write domain, clear the write domain. This will move the object to the inactive list rather than the flushing list, avoiding trouble with objects left stuck on the flushing list.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/i915_gem.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c
index acded2e8..354bd0db 100644
--- a/linux-core/i915_gem.c
+++ b/linux-core/i915_gem.c
@@ -661,6 +661,12 @@ i915_gem_retire_request(struct drm_device *dev,
__func__, request->seqno, obj);
#endif
+ /* If this request flushes the write domain,
+ * clear the write domain from the object now
+ */
+ if (request->flush_domains & obj->write_domain)
+ obj->write_domain = 0;
+
if (obj->write_domain != 0) {
list_move_tail(&obj_priv->list,
&dev_priv->mm.flushing_list);
@@ -760,7 +766,7 @@ i915_wait_request(struct drm_device *dev, uint32_t seqno)
if (dev_priv->mm.wedged)
ret = -EIO;
- if (ret)
+ if (ret && ret != -ERESTARTSYS)
DRM_ERROR("%s returns %d (awaiting %d at %d)\n",
__func__, ret, seqno, i915_get_gem_seqno(dev));
@@ -890,13 +896,6 @@ i915_gem_object_wait_rendering(struct drm_gem_object *obj)
ret = i915_wait_request(dev, obj_priv->last_rendering_seqno);
if (ret != 0)
return ret;
- if (write_domain) {
-#if WATCH_BUF
- DRM_INFO("%s: flushed object %p from write domain %08x\n",
- __func__, obj, write_domain);
-#endif
- obj->write_domain = 0;
- }
}
return 0;