diff options
author | Keith Packard <keithp@keithp.com> | 2008-06-10 18:11:15 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-06-13 14:29:45 -0700 |
commit | e5364914ac2b785f9d806c72fff8d2ae914cad61 (patch) | |
tree | c1f41bdd0991b1f962b79db1a8e527d273392e21 /linux-core | |
parent | f378319b5627d84ca821c8e6a9f2fee612119477 (diff) |
[intel-gem] Reorder i915_add_request to schedule work last
i915_add_request was calling schedule_delayed_work before adding the request
to the list; it makes more sense to do that last.
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/i915_gem.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c index 634b4f6c..a14781f6 100644 --- a/linux-core/i915_gem.c +++ b/linux-core/i915_gem.c @@ -333,6 +333,7 @@ i915_add_request(struct drm_device *dev, uint32_t flush_domains) drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_gem_request *request; uint32_t seqno; + int was_empty; RING_LOCALS; request = drm_calloc(1, sizeof(*request), DRM_MEM_DRIVER); @@ -360,11 +361,11 @@ i915_add_request(struct drm_device *dev, uint32_t flush_domains) request->seqno = seqno; request->emitted_jiffies = jiffies; request->flush_domains = flush_domains; - if (list_empty(&dev_priv->mm.request_list)) - mod_timer(&dev_priv->mm.retire_timer, jiffies + HZ); - + was_empty = list_empty(&dev_priv->mm.request_list); list_add_tail(&request->list, &dev_priv->mm.request_list); + if (was_empty) + schedule_delayed_work (&dev_priv->mm.retire_work, HZ); return seqno; } |