[Intel-gfx] [PATCH 08/13] drm/i915: drop seqno argument from i915_gem_object_move_to_active
Daniel Vetter
daniel.vetter at ffwll.ch
Thu Feb 4 22:05:08 CET 2010
By moving one i915_add_request we can soley depend on the new
auto-seqno-numbering behaviour.
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
drivers/gpu/drm/i915/i915_gem.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6440801..72a5308 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1507,20 +1507,19 @@ i915_gem_object_put_pages(struct drm_gem_object *obj)
}
static void
-i915_gem_object_move_to_active(struct drm_gem_object *obj, uint32_t seqno)
+i915_gem_object_move_to_active(struct drm_gem_object *obj)
{
struct drm_device *dev = obj->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
struct drm_i915_gem_object *obj_priv = obj->driver_private;
+ uint32_t seqno = dev_priv->mm.next_gem_seqno;
/* Add a reference if we're newly entering the active list. */
if (!obj_priv->active) {
drm_gem_object_reference(obj);
obj_priv->active = 1;
}
- /* Take the seqno of the next request if none is given */
- if (seqno == 0)
- seqno = dev_priv->mm.next_gem_seqno;
+
/* Move from whatever list we were on to the tail of execution. */
spin_lock(&dev_priv->mm.active_list_lock);
list_move_tail(&obj_priv->list,
@@ -1601,7 +1600,7 @@ i915_gem_process_flushing_list(struct drm_device *dev, uint32_t flush_domains)
obj->write_domain = 0;
list_del_init(&obj_priv->gpu_write_list);
- i915_gem_object_move_to_active(obj, 0);
+ i915_gem_object_move_to_active(obj);
/* update the fence lru list */
if (obj_priv->fence_reg != I915_FENCE_REG_NONE) {
@@ -3973,15 +3972,15 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
* *some* interrupts representing completion of buffers that we can
* wait on when trying to clear up gtt space).
*/
- seqno = i915_add_request(dev, file_priv);
for (i = 0; i < args->buffer_count; i++) {
struct drm_gem_object *obj = object_list[i];
- i915_gem_object_move_to_active(obj, seqno);
+ i915_gem_object_move_to_active(obj);
#if WATCH_LRU
DRM_INFO("%s: move to exec list %p\n", __func__, obj);
#endif
}
+ seqno = i915_add_request(dev, file_priv);
#if WATCH_LRU
i915_dump_lru(dev, __func__);
#endif
--
1.6.6.1
More information about the Intel-gfx
mailing list