[PATCH 8/9] drm/i915: Support context single submission

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

 



This patch introduces the support of context signle submission. As GVT
context may come from different guests, which requires different
configuration of render registers. It can't be combined in a dual ELSP
submission combo.

We make this function as a context feature in context creation service.
Only GVT-g will create this kinds of GEM context currently.

v5:

- Only compile this feature when CONFIG_DRM_I915_GVT=y. (Tvrtko)

Signed-off-by: Zhi Wang <zhi.a.wang@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_drv.h  |  2 +-
 drivers/gpu/drm/i915/intel_lrc.c | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 9688006..b8f1e9a 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -890,8 +890,8 @@ struct intel_context {
 	bool use_48bit_addressing_mode;
 #if IS_ENABLED(CONFIG_DRM_I915_GVT)
 	bool enable_status_change_notification;
+	bool single_submission;
 #endif
-
 	struct list_head link;
 };
 
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 9069836..8d1a9c2 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -455,6 +455,21 @@ static void execlists_context_unqueue(struct intel_engine_cs *engine)
 			i915_gem_request_unreference(req0);
 			req0 = cursor;
 		} else {
+#if IS_ENABLED(CONFIG_DRM_I915_GVT)
+
+			/*
+			 * req0 (after merged) ctx requires single submission,
+			 * stop picking
+			 */
+			if (req0->ctx->single_submission)
+				break;
+			/*
+			 * req0 ctx doesn't require single submission, but
+			 * next req ctx requires, stop picking req1
+			 */
+			if (cursor->ctx->single_submission)
+				break;
+#endif
 			req1 = cursor;
 			WARN_ON(req1->elsp_submitted);
 			break;
-- 
1.9.1

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux