diff options
author | Keith Packard <keithp@keithp.com> | 2008-06-13 09:19:30 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-06-13 14:29:46 -0700 |
commit | 462af73149b9286a74b95b9cda5e4224ebe0dd87 (patch) | |
tree | f205a0286d7c070e3d70be096e0eb045f043867f /linux-core | |
parent | e5364914ac2b785f9d806c72fff8d2ae914cad61 (diff) |
[intel-gem] Use a delayed_work instead of a timer + work_struct
We want request retirement to occur about once a second when the request
queue is non-empty. This was done with a timer that queued a work_struct,
using a delayed_work instead makes a lot more sense.
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/i915_gem.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c index a14781f6..115f8e75 100644 --- a/linux-core/i915_gem.c +++ b/linux-core/i915_gem.c @@ -503,28 +503,19 @@ i915_gem_retire_requests(struct drm_device *dev) } void -i915_gem_retire_timeout(unsigned long data) -{ - struct drm_device *dev = (struct drm_device *) data; - drm_i915_private_t *dev_priv = dev->dev_private; - - schedule_work(&dev_priv->mm.retire_task); -} - -void -i915_gem_retire_handler(struct work_struct *work) +i915_gem_retire_work_handler(struct work_struct *work) { drm_i915_private_t *dev_priv; struct drm_device *dev; dev_priv = container_of(work, drm_i915_private_t, - mm.retire_task); + mm.retire_work.work); dev = dev_priv->dev; mutex_lock(&dev->struct_mutex); i915_gem_retire_requests(dev); if (!list_empty(&dev_priv->mm.request_list)) - mod_timer(&dev_priv->mm.retire_timer, jiffies + HZ); + schedule_delayed_work (&dev_priv->mm.retire_work, HZ); mutex_unlock(&dev->struct_mutex); } |