@@ -537,11 +543,13 @@ void intel_disable_guc_interrupts(struct
drm_i915_private *dev_priv)
spin_unlock_irq(&dev_priv->irq_lock);
synchronize_irq(dev_priv->drm.irq);
- intel_reset_guc_interrupts(dev_priv);
+ intel_reset_guc_interrupts(guc);
}
-void intel_guc_irq_handler(struct drm_i915_private *dev_priv, u32
gt_iir)
+void intel_guc_irq_handler(struct intel_guc *guc, u32 gt_iir)
{
+ struct drm_i915_private *dev_priv = guc_to_i915(guc);
+
if (gt_iir & GEN9_GUC_TO_HOST_INT_EVENT) {
/* Sample the log buffer flush related bits & clear them out
now
* itself from the message identity register to minimize the
diff --git a/drivers/gpu/drm/i915/intel_guc.h
b/drivers/gpu/drm/i915/intel_guc.h
index c37d34d..49f33b9 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_guc.h
@@ -131,9 +131,9 @@ static inline u32 guc_ggtt_offset(struct i915_vma
*vma)
int intel_guc_resume(struct drm_i915_private *dev_priv);
struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32
size);
u32 intel_guc_wopcm_size(struct drm_i915_private *dev_priv);
-void intel_reset_guc_interrupts(struct drm_i915_private *dev_priv);
-void intel_enable_guc_interrupts(struct drm_i915_private *dev_priv);
-void intel_disable_guc_interrupts(struct drm_i915_private *dev_priv);
-void intel_guc_irq_handler(struct drm_i915_private *dev_priv, u32
pm_iir);
+void intel_reset_guc_interrupts(struct intel_guc *guc);
+void intel_enable_guc_interrupts(struct intel_guc *guc);
+void intel_disable_guc_interrupts(struct intel_guc *guc);
+void intel_guc_irq_handler(struct intel_guc *guc, u32 pm_iir);
#endif
diff --git a/drivers/gpu/drm/i915/intel_guc_log.c
b/drivers/gpu/drm/i915/intel_guc_log.c
index 5cd68f6..59a9021 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -480,14 +480,12 @@ static void guc_log_capture_logs(struct
intel_guc *guc)
static void guc_flush_logs(struct intel_guc *guc)
{
- struct drm_i915_private *dev_priv = guc_to_i915(guc);
-
if (!USES_GUC_SUBMISSION(dev_priv) ||
(i915_modparams.guc_log_level < 0))
return;
/* First disable the interrupts, will be renabled afterwards */
- intel_disable_guc_interrupts(dev_priv);
+ intel_disable_guc_interrupts(guc);
/* Before initiating the forceful flush, wait for any
pending/ongoing
* flush to complete otherwise forceful flush may not actually
happen.
@@ -605,7 +603,7 @@ int i915_guc_log_control(struct drm_i915_private
*dev_priv, u64 control_val)
}
/* GuC logging is currently the only user of Guc2Host
interrupts */
- intel_enable_guc_interrupts(dev_priv);
+ intel_enable_guc_interrupts(guc);
} else {
/* Once logging is disabled, GuC won't generate logs & send an
* interrupt. But there could be some data in the log buffer
@@ -639,7 +637,7 @@ 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 */
- intel_disable_guc_interrupts(dev_priv);
+ intel_disable_guc_interrupts(&dev_priv->guc);
guc_log_runtime_destroy(&dev_priv->guc);
mutex_unlock(&dev_priv->drm.struct_mutex);
}
diff --git a/drivers/gpu/drm/i915/intel_uc.c
b/drivers/gpu/drm/i915/intel_uc.c
index 8e58e5a..f82453b 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -271,7 +271,7 @@ int intel_uc_init_hw(struct drm_i915_private
*dev_priv)
GEM_BUG_ON(!HAS_GUC(dev_priv));
guc_disable_communication(guc);
- intel_reset_guc_interrupts(dev_priv);
+ intel_reset_guc_interrupts(guc);
/* init WOPCM */
I915_WRITE(GUC_WOPCM_SIZE, intel_guc_wopcm_size(dev_priv));
@@ -325,7 +325,7 @@ int intel_uc_init_hw(struct drm_i915_private
*dev_priv)
if (USES_GUC_SUBMISSION(dev_priv)) {
if (i915_modparams.guc_log_level >= 0)
- intel_enable_guc_interrupts(dev_priv);
+ intel_enable_guc_interrupts(guc);
ret = intel_guc_submission_enable(guc);
if (ret)
@@ -345,7 +345,7 @@ int intel_uc_init_hw(struct drm_i915_private
*dev_priv)
* We've failed to load the firmware :(
*/
err_interrupts:
- intel_disable_guc_interrupts(dev_priv);
+ intel_disable_guc_interrupts(guc);
err_communication:
guc_disable_communication(guc);
err_log_capture:
@@ -379,5 +379,5 @@ void intel_uc_fini_hw(struct drm_i915_private
*dev_priv)
guc_disable_communication(guc);
if (USES_GUC_SUBMISSION(dev_priv))
- intel_disable_guc_interrupts(dev_priv);
+ intel_disable_guc_interrupts(guc);
}