[Intel-gfx] [PATCH 1/2] drm/i915/guc: Add GuC method to determine if submission is active.

don.hiatt at intel.com don.hiatt at intel.com
Fri Nov 15 01:11:11 UTC 2019


From: Don Hiatt <don.hiatt at intel.com>

Add intel_guc_submission_is_enabled() function to determine if
GuC submission is active.

v2: No need to look at engine to determine if submission is enabled.

Signed-off-by: Don Hiatt <don.hiatt at intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 1779f600fcfb..7d032f57fc6e 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2044,4 +2044,10 @@ i915_coherent_map_type(struct drm_i915_private *i915)
 	return HAS_LLC(i915) ? I915_MAP_WB : I915_MAP_WC;
 }
 
+static inline bool intel_guc_submission_is_enabled(struct intel_guc *guc)
+{
+	return intel_guc_is_submission_supported(guc) &&
+		intel_guc_is_running(guc);
+}
+
 #endif
-- 
2.20.1



More information about the Intel-gfx mailing list