All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/ctx: Remove bad invariant
@ 2013-02-11 21:24 Ben Widawsky
  2013-02-11 21:31 ` [PATCH v2] " Ben Widawsky
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Widawsky @ 2013-02-11 21:24 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ben Widawsky

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.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_gem_context.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 13cada0..9893095 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -145,8 +145,6 @@ static void do_destroy(struct i915_hw_context *ctx)
 
 	if (ctx->file_priv)
 		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);
 	kfree(ctx);
-- 
1.8.1.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] drm/i915/ctx: Remove bad invariant
  2013-02-11 21:24 [PATCH] drm/i915/ctx: Remove bad invariant Ben Widawsky
@ 2013-02-11 21:31 ` Ben Widawsky
  2013-02-12 13:25   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Widawsky @ 2013-02-11 21:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ben Widawsky

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>
---
 drivers/gpu/drm/i915/i915_gem_context.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 2c9a6bc..2a79749 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -135,9 +135,6 @@ static int get_context_size(struct drm_device *dev, bool advanced)
 
 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->ring_obj) {
 		i915_gem_object_unpin(ctx->ring_obj);
 		drm_gem_object_unreference(&ctx->ring_obj->base);
@@ -145,8 +142,6 @@ static void do_destroy(struct i915_hw_context *ctx)
 
 	if (ctx->file_priv)
 		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);
 	kfree(ctx);
-- 
1.8.1.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/i915/ctx: Remove bad invariant
  2013-02-11 21:31 ` [PATCH v2] " Ben Widawsky
@ 2013-02-12 13:25   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2013-02-12 13:25 UTC (permalink / raw)
  To: Ben Widawsky; +Cc: intel-gfx

On Mon, Feb 11, 2013 at 01:31:27PM -0800, Ben Widawsky wrote:
> 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>
Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-12 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-11 21:24 [PATCH] drm/i915/ctx: Remove bad invariant Ben Widawsky
2013-02-11 21:31 ` [PATCH v2] " Ben Widawsky
2013-02-12 13:25   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.