diff options
-rw-r--r-- | linux-core/i915_gem.c | 15 | ||||
-rw-r--r-- | shared-core/i915_dma.c | 7 | ||||
-rw-r--r-- | shared-core/i915_drv.h | 9 |
3 files changed, 10 insertions, 21 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); } diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 667a6ac0..669f1e4e 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -1072,11 +1072,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) 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__ diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h index 5af9a964..5cc6e680 100644 --- a/shared-core/i915_drv.h +++ b/shared-core/i915_drv.h @@ -285,8 +285,7 @@ typedef struct drm_i915_private { * 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; @@ -488,8 +487,7 @@ int i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment); 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__ @@ -915,6 +913,9 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); #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) |