[Intel-gfx] [PATCH 07/15] drm/i915: drop seqno argument from i915_gem_object_move_to_active
Daniel Vetter
daniel.vetter at ffwll.ch
Thu Mar 11 16:58:52 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, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index bb9595a..67557f1 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1496,11 +1496,12 @@ i915_gem_next_request_seqno(struct drm_device *dev)
}
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 = i915_gem_next_request_seqno(dev);
/* Add a reference if we're newly entering the active list. */
if (!obj_priv->active) {
@@ -1508,10 +1509,6 @@ i915_gem_object_move_to_active(struct drm_gem_object *obj, uint32_t seqno)
obj_priv->active = 1;
}
- /* Take the seqno of the next request if none is given */
- if (seqno == 0)
- seqno = i915_gem_next_request_seqno(dev);
-
/* 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,
@@ -1592,7 +1589,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) {
@@ -4002,15 +3999,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