summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2018-03-19 12:50:49 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-03-21 15:09:14 +0000
commite9c7e651798b340a175e18fc70ba41c7008d0760 (patch)
tree6be5849da183cc32402e0dd17e7e31f0bd6a4eac /drivers/gpu
parentbc598425eb18d40a18f18d67f7c460189c43a3af (diff)
downloadlinux-e9c7e651798b340a175e18fc70ba41c7008d0760.tar.bz2
drm/i915/guc: Handle GuC log flush event in dedicated function
We already try to keep all GuC log related code in separate file, handling flush event should be placed there too. This will also allow future code reuse. v2: rebased Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Michal Winiarski <michal.winiarski@intel.com> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Oscar Mateo <oscar.mateo@intel.com> Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20180319125049.48932-1-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_guc.c3
-rw-r--r--drivers/gpu/drm/i915/intel_guc_log.c5
-rw-r--r--drivers/gpu/drm/i915/intel_guc_log.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
index 4b7c9c6415dd..8f93f5bef8fd 100644
--- a/drivers/gpu/drm/i915/intel_guc.c
+++ b/drivers/gpu/drm/i915/intel_guc.c
@@ -398,8 +398,7 @@ void intel_guc_to_host_event_handler(struct intel_guc *guc)
if (msg & (INTEL_GUC_RECV_MSG_FLUSH_LOG_BUFFER |
INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED))
- queue_work(guc->log.relay.flush_wq,
- &guc->log.relay.flush_work);
+ intel_guc_log_handle_flush_event(&guc->log);
}
int intel_guc_sample_forcewake(struct intel_guc *guc)
diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
index a401f7e72c14..401e1704d61e 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -623,3 +623,8 @@ void intel_guc_log_relay_close(struct intel_guc_log *log)
guc_log_relay_destroy(log);
mutex_unlock(&log->relay.lock);
}
+
+void intel_guc_log_handle_flush_event(struct intel_guc_log *log)
+{
+ queue_work(log->relay.flush_wq, &log->relay.flush_work);
+}
diff --git a/drivers/gpu/drm/i915/intel_guc_log.h b/drivers/gpu/drm/i915/intel_guc_log.h
index 1b0d2fa4c0b6..fa80535a6f9d 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.h
+++ b/drivers/gpu/drm/i915/intel_guc_log.h
@@ -87,4 +87,6 @@ int intel_guc_log_relay_open(struct intel_guc_log *log);
void intel_guc_log_relay_flush(struct intel_guc_log *log);
void intel_guc_log_relay_close(struct intel_guc_log *log);
+void intel_guc_log_handle_flush_event(struct intel_guc_log *log);
+
#endif