Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: relax debug BUG_ON() for closed context in hw_id pin
@ 2019-03-08  7:52 Zhenyu Wang
  2019-03-08  8:31 ` Chris Wilson
  2019-03-08  8:39 ` ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Zhenyu Wang @ 2019-03-08  7:52 UTC (permalink / raw)
  To: intel-gfx; +Cc: intel-gvt-dev

Current GVT created context is marked closed as not to be used for
host user. But its hw_id should still be used. So this is to relax
debug BUG_ON() in __i915_gem_context_pin_hw_id() for GVT contexts
which can use force single submission flag to identify.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_context.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index b9f321947982..0cbc5293da1c 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -1400,7 +1400,8 @@ int __i915_gem_context_pin_hw_id(struct i915_gem_context *ctx)
 
 	mutex_lock(&i915->contexts.mutex);
 
-	GEM_BUG_ON(i915_gem_context_is_closed(ctx));
+	GEM_BUG_ON(i915_gem_context_is_closed(ctx) &&
+		   !i915_gem_context_force_single_submission(ctx));
 
 	if (list_empty(&ctx->hw_id_link)) {
 		GEM_BUG_ON(atomic_read(&ctx->hw_id_pin_count));
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-03-09 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-08  7:52 [PATCH] drm/i915: relax debug BUG_ON() for closed context in hw_id pin Zhenyu Wang
2019-03-08  8:31 ` Chris Wilson
2019-03-09  3:39   ` Zhenyu Wang
2019-03-09 17:41     ` Chris Wilson
2019-03-08  8:39 ` ✗ Fi.CI.BAT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox