diff mbox

[3/5] drm/i915: check gpu_write_list in move_to_flushing

Message ID 1303245964-3022-4-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter April 19, 2011, 8:46 p.m. UTC
The corresponding WARN_ON with opposite sign already exists in
move_to_inactive, hence add it here for symmetry.

I've actually hit this while hunting down bugs in various
pipelined fencing patches.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
 drivers/gpu/drm/i915/i915_gem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox


diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5c900d3..f658f4f 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1749,6 +1749,7 @@  i915_gem_object_move_to_flushing(struct drm_i915_gem_object *obj)
 	drm_i915_private_t *dev_priv = dev->dev_private;
+	WARN_ON(list_empty(&obj->gpu_write_list));
 	list_move_tail(&obj->mm_list, &dev_priv->mm.flushing_list);