From: Oscar Mateo <oscar.mateo@xxxxxxxxx> To allow future code reuse. Cc: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx> Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx> --- drivers/gpu/drm/i915/intel_guc_log.c | 8 ++++++++ drivers/gpu/drm/i915/intel_uc.c | 6 +----- drivers/gpu/drm/i915/intel_uc.h | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c index 16d3b87..acd9a3f 100644 --- a/drivers/gpu/drm/i915/intel_guc_log.c +++ b/drivers/gpu/drm/i915/intel_guc_log.c @@ -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; diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index 3d997a3..f1a6af7 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c @@ -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 diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h index 14dbe9f..9979a22 100644 --- a/drivers/gpu/drm/i915/intel_uc.h +++ b/drivers/gpu/drm/i915/intel_uc.h @@ -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); -- 2.7.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx