[PATCH 21/23] drm/i915: Mark GuC load status as PENDING in i915_drm_resume_early

Sagar Arun Kamble sagar.a.kamble at intel.com
Mon Aug 22 04:46:27 UTC 2016


This will help avoid Host to GuC actions being called till GuC gets
loaded during i915_drm_resume.

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index d5d0a50..627d223 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1629,6 +1629,7 @@ static int i915_drm_resume(struct drm_device *dev)
 static int i915_drm_resume_early(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = to_i915(dev);
+	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
 	int ret;
 
 	/*
@@ -1685,6 +1686,12 @@ static int i915_drm_resume_early(struct drm_device *dev)
 		DRM_ERROR("Resume prepare failed: %d, continuing anyway\n",
 			  ret);
 
+	/*
+	 * Mark GuC FW load status as PENDING to avoid any Host to GuC actions
+	 * invoked till GuC gets loaded in i915_drm_resume.
+	*/
+	guc_fw->guc_fw_load_status = GUC_FIRMWARE_PENDING;
+
 	intel_uncore_early_sanitize(dev_priv, true);
 
 	if (IS_BROXTON(dev_priv)) {
-- 
1.9.1



More information about the Intel-gfx-trybot mailing list