[PATCH] drm/i915: relax debug BUG_ON() for closed context in hw_id pin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux