@@ -520,6 +520,14 @@ static void guc_flush_logs(struct intel_guc *guc)
guc_log_capture_logs(guc);
}
+void intel_guc_log_flush(struct intel_guc *guc)
+{
+ /* Handle flush interrupt in bottom half */
+ queue_work(guc->log.runtime.flush_wq, &guc->log.runtime.flush_work);
+
+ guc->log.flush_interrupt_count++;
+}
+
int intel_guc_log_create(struct intel_guc *guc)
{
struct i915_vma *vma;
@@ -557,11 +557,7 @@ void intel_guc_notification_handler(struct intel_guc *guc)
/* Clear the message bits that are handled */
I915_WRITE(SOFT_SCRATCH(15), msg & ~flush);
- /* Handle flush interrupt in bottom half */
- queue_work(dev_priv->guc.log.runtime.flush_wq,
- &dev_priv->guc.log.runtime.flush_work);
-
- dev_priv->guc.log.flush_interrupt_count++;
+ intel_guc_log_flush(&dev_priv->guc);
} else {
/*
* Not clearing of unhandled event bits won't result in
@@ -270,6 +270,7 @@ struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size);
/* intel_guc_log.c */
int intel_guc_log_create(struct intel_guc *guc);
void intel_guc_log_destroy(struct intel_guc *guc);
+void intel_guc_log_flush(struct intel_guc *guc);
int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val);
void i915_guc_log_register(struct drm_i915_private *dev_priv);
void i915_guc_log_unregister(struct drm_i915_private *dev_priv);