}
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);
}
INIT_LIST_HEAD(&dev_priv->mm.flushing_list);
INIT_LIST_HEAD(&dev_priv->mm.inactive_list);
INIT_LIST_HEAD(&dev_priv->mm.request_list);
- dev_priv->mm.retire_timer.function = i915_gem_retire_timeout;
- dev_priv->mm.retire_timer.data = (unsigned long) dev;
- init_timer_deferrable (&dev_priv->mm.retire_timer);
- INIT_WORK(&dev_priv->mm.retire_task,
- i915_gem_retire_handler);
+ INIT_DELAYED_WORK(&dev_priv->mm.retire_work,
+ i915_gem_retire_work_handler);
dev_priv->mm.next_gem_seqno = 1;
#ifdef __linux__
* fire periodically while the ring is running. When it
* fires, go retire requests.
*/
- struct timer_list retire_timer;
- struct work_struct retire_task;
+ struct delayed_work retire_work;
uint32_t next_gem_seqno;
void i915_gem_object_unpin(struct drm_gem_object *obj);
void i915_gem_lastclose(struct drm_device *dev);
void i915_gem_retire_requests(struct drm_device *dev);
-void i915_gem_retire_timeout(unsigned long data);
-void i915_gem_retire_handler(struct work_struct *work);
+void i915_gem_retire_work_handler(struct work_struct *work);
#endif
#ifdef __linux__
#define XY_SRC_COPY_BLT_SRC_TILED (1<<15)
#define XY_SRC_COPY_BLT_DST_TILED (1<<11)
+#define MI_NOOP (0)
+#define MI_NOOP_ENABLE_NOPID (1 << 22)
+#define MI_NOOP_ID_MASK ((1 << 22) - 1)
#define MI_BATCH_BUFFER ((0x30<<23)|1)
#define MI_BATCH_BUFFER_START (0x31<<23)