[Intel-gfx] [PATCH v2 17/18] drm/i915: Taking forcewake during GuC load.

yu.dai at intel.com yu.dai at intel.com
Fri Apr 3 11:08:43 PDT 2015


From: Sagar Kamble <sagar.a.kamble at intel.com>

The firmware loader will use GuC DMA engine to move data from
ggtt to WOPCM. Need to take forcewake before GuC loading.

Issue: VIZ-4884
Change-Id: Ie422fc1e122933b161ff63cab23622197e6bba54
Signed-off-by: Sagar Kamble <sagar.a.kamble at intel.com>
---
 drivers/gpu/drm/i915/intel_guc_loader.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 3a33618..2edf329 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -338,6 +338,7 @@ static int guc_load_ucode(struct drm_device *dev)
 	int ret;
 
 	WARN_ON(!mutex_is_locked(&dev->struct_mutex));
+	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
 
 	ret = i915_gem_obj_ggtt_pin(guc_fw->uc_fw_obj, 0, 0);
 	if (ret)
@@ -386,6 +387,8 @@ out:
 	if (pinned)
 		i915_gem_object_ggtt_unpin(guc_fw->uc_fw_obj);
 
+	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
+
 	return ret;
 }
 
-- 
1.9.1



More information about the Intel-gfx mailing list