[PATCH v14 07/25] drm/i915/guc: Grab RPM wakelock while disabling GuC interrupts

Sagar Arun Kamble sagar.a.kamble at intel.com
Tue Oct 17 10:36:56 UTC 2017


Disabling GuC interrupts involves access to GuC IRQ control registers
hence ensure device is RPM awake.

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_guc_log.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
index f87e9f5..dbb50ce2 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -656,8 +656,11 @@ void i915_guc_log_unregister(struct drm_i915_private *dev_priv)
 {
 	mutex_lock(&dev_priv->drm.struct_mutex);
 	/* GuC logging is currently the only user of Guc2Host interrupts */
-	if (i915_modparams.guc_log_level >= 0)
+	if (i915_modparams.guc_log_level >= 0) {
+		intel_runtime_pm_get(dev_priv);
 		intel_disable_guc_interrupts(&dev_priv->guc);
+		intel_runtime_pm_put(dev_priv);
+	}
 	guc_log_runtime_destroy(&dev_priv->guc);
 	mutex_unlock(&dev_priv->drm.struct_mutex);
 }
-- 
1.9.1



More information about the Intel-gfx-trybot mailing list