[Intel-gfx] [CI 8/8] ucode-resume

Chris Wilson chris at chris-wilson.co.uk
Wed May 18 09:50:47 UTC 2016


---
 drivers/gpu/drm/i915/i915_drv.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 8b4f26b82e62..4de9fd44aa62 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -822,6 +822,20 @@ static void i915_gem_resume(void *data, async_cookie_t cookie)
 	resume_context_put(ctx);
 }
 
+static void intel_ucode_resume(void *data, async_cookie_t cookie)
+{
+	struct resume_context *ctx = data;
+	struct drm_device *dev = ctx->i915->dev;
+
+	intel_csr_ucode_resume(ctx->i915);
+
+	async_fence_wait(ctx->irq_fence);
+
+	intel_guc_resume(dev);
+
+	resume_context_put(ctx);
+}
+
 static void intel_kms_register(void *data, async_cookie_t cookie)
 {
 	struct resume_context *ctx = data;
@@ -900,7 +914,9 @@ static int i915_drm_resume(struct drm_device *dev)
 					    resume_context_get(ctx),
 					    &ctx->i915->async_domain);
 
-	intel_csr_ucode_resume(ctx->i915);
+	ctx->cookie = async_schedule_domain(intel_ucode_resume,
+					    resume_context_get(ctx),
+					    &ctx->i915->async_domain);
 
 	i915_restore_state(dev);
 
@@ -919,8 +935,6 @@ static int i915_drm_resume(struct drm_device *dev)
 	intel_runtime_pm_enable_interrupts(ctx->i915);
 	async_fence_signal(ctx->irq_fence);
 
-	intel_guc_resume(dev);
-
 	enable_rpm_wakeref_asserts(ctx->i915);
 
 	return 0;
-- 
2.8.1



More information about the Intel-gfx mailing list