Skip to content

Commit

Permalink
drm/i915/guc: Handle GuC log flush event in dedicated function
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Michal Wajdeczko authored and Chris Wilson committed Mar 21, 2018
1 parent bc59842 commit e9c7e65
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/i915/intel_guc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions drivers/gpu/drm/i915/intel_guc_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/intel_guc_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e9c7e65

Please sign in to comment.