Re: [PATCH] drm/i915/guc: Flush the CT worker after updating log controls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 18 Jul 2019 10:02:03 +0200, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:

...

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
index 77fda1e85d3b..e80c1eb309ee 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
@@ -613,12 +613,11 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log)
 void intel_guc_log_relay_close(struct intel_guc_log *log)
 {
 	struct intel_guc *guc = log_to_guc(log);
-	struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
	guc_log_disable_flush_events(log);
-	intel_synchronize_irq(i915);
-	flush_work(&log->relay.flush_work);
+	flush_work(&guc->ct.worker);

We don't need to touch ct.worker here as in above call to
guc_log_disable_flush_events() we will turn off handling of
all log events (they will be dropped if processed later by
the ct.worker in intel_guc_to_host_process_recv_msg)

Additionally touching ct.worker here will break our nice
separation between guc components

Michal

+	cancel_work_sync(&log->relay.flush_work);
	mutex_lock(&log->relay.lock);
 	GEM_BUG_ON(!intel_guc_log_relay_enabled(log));
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux