mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
4fc7c971c3
commit
f73f760725
|
@ -126,13 +126,8 @@ static int get_context_size(struct drm_device *dev)
|
||||||
|
|
||||||
static void do_destroy(struct i915_hw_context *ctx)
|
static void do_destroy(struct i915_hw_context *ctx)
|
||||||
{
|
{
|
||||||
struct drm_device *dev = ctx->obj->base.dev;
|
|
||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
|
||||||
|
|
||||||
if (ctx->file_priv)
|
if (ctx->file_priv)
|
||||||
idr_remove(&ctx->file_priv->context_idr, ctx->id);
|
idr_remove(&ctx->file_priv->context_idr, ctx->id);
|
||||||
else
|
|
||||||
BUG_ON(ctx != dev_priv->ring[RCS].default_context);
|
|
||||||
|
|
||||||
drm_gem_object_unreference(&ctx->obj->base);
|
drm_gem_object_unreference(&ctx->obj->base);
|
||||||
kfree(ctx);
|
kfree(ctx);
|
||||||
|
|
Loading…
Reference in New Issue