aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-02-11 16:31:27 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-02-15 04:30:40 -0500
commitf73f760725636b9d0c3786273e185b053516d1eb (patch)
tree8d198f9797ec563b9dc22229a832edbcf8f326eb
parent4fc7c971c3aedf937f824c063d698779d25c3330 (diff)
drm/i915/ctx: Remove bad invariant
It's not that the assertion is incorrect, but rather that we can call do_destroy early in loading, and we will falsely BUG(). Since contexts have been in for a while now, and in the internal APIs are pretty stable, it should be fairly safe to remove this. v2: Remove unused dev_priv, and dev Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_gem_context.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index e7ecafa8e598..21177d9df423 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -126,13 +126,8 @@ static int get_context_size(struct drm_device *dev)
126 126
127static void do_destroy(struct i915_hw_context *ctx) 127static void do_destroy(struct i915_hw_context *ctx)
128{ 128{
129 struct drm_device *dev = ctx->obj->base.dev;
130 struct drm_i915_private *dev_priv = dev->dev_private;
131
132 if (ctx->file_priv) 129 if (ctx->file_priv)
133 idr_remove(&ctx->file_priv->context_idr, ctx->id); 130 idr_remove(&ctx->file_priv->context_idr, ctx->id);
134 else
135 BUG_ON(ctx != dev_priv->ring[RCS].default_context);
136 131
137 drm_gem_object_unreference(&ctx->obj->base); 132 drm_gem_object_unreference(&ctx->obj->base);
138 kfree(ctx); 133 kfree(ctx);