Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH] drm/xe: Remove unnecessary memory barriers related to wait queue
@ 2023-07-27 18:34 Matthew Brost
  2023-07-27 20:40 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Matthew Brost @ 2023-07-27 18:34 UTC (permalink / raw)
  To: intel-xe

These not needed per the wait queue doc, remove them.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ct.c     | 3 ---
 drivers/gpu/drm/xe/xe_guc_submit.c | 9 +--------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index cb75db30800c..3f58902b6be3 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -308,7 +308,6 @@ int xe_guc_ct_enable(struct xe_guc_ct *ct)
 	spin_unlock_irq(&ct->fast_lock);
 	mutex_unlock(&ct->lock);
 
-	smp_mb();
 	wake_up_all(&ct->wq);
 	drm_dbg(&xe->drm, "GuC CT communication channel enabled\n");
 
@@ -820,8 +819,6 @@ static int parse_g2h_response(struct xe_guc_ct *ct, u32 *msg, u32 len)
 	g2h_release_space(ct, GUC_CTB_HXG_MSG_MAX_LEN);
 
 	g2h_fence->done = true;
-	smp_mb();
-
 	wake_up_all(&ct->g2h_fence_wq);
 
 	return 0;
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 6cb64a097297..d623cd9f6cc4 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -705,7 +705,6 @@ static void disable_scheduling_deregister(struct xe_guc *guc,
 	int ret;
 
 	set_min_preemption_timeout(guc, e);
-	smp_rmb();
 	ret = wait_event_timeout(guc->ct.wq, !engine_pending_enable(e) ||
 				 guc_read_stopped(guc), HZ * 5);
 	if (!ret) {
@@ -888,7 +887,6 @@ guc_engine_timedout_job(struct drm_sched_job *drm_job)
 		 * error) messages which can cause the schedule disable to get
 		 * lost. If this occurs, trigger a GT reset to recover.
 		 */
-		smp_rmb();
 		ret = wait_event_timeout(guc->ct.wq,
 					 !engine_pending_disable(e) ||
 					 guc_read_stopped(guc), HZ * 5);
@@ -1008,7 +1006,6 @@ static void suspend_fence_signal(struct xe_engine *e)
 	XE_BUG_ON(!e->guc->suspend_pending);
 
 	e->guc->suspend_pending = false;
-	smp_wmb();
 	wake_up(&e->guc->suspend_wait);
 }
 
@@ -1392,7 +1389,6 @@ int xe_guc_submit_reset_prepare(struct xe_guc *guc)
 	 * and releasing any TDRs waiting on guc->submission_state.stopped.
 	 */
 	ret = atomic_fetch_or(1, &guc->submission_state.stopped);
-	smp_wmb();
 	wake_up_all(&guc->ct.wq);
 
 	return ret;
@@ -1521,17 +1517,14 @@ int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
 	if (engine_pending_enable(e)) {
 		e->guc->resume_time = ktime_get();
 		clear_engine_pending_enable(e);
-		smp_wmb();
 		wake_up_all(&guc->ct.wq);
 	} else {
 		clear_engine_pending_disable(e);
 		if (e->guc->suspend_pending) {
 			suspend_fence_signal(e);
 		} else {
-			if (engine_banned(e)) {
-				smp_wmb();
+			if (engine_banned(e))
 				wake_up_all(&guc->ct.wq);
-			}
 			deregister_engine(guc, e);
 		}
 	}
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-28 14:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27 18:34 [Intel-xe] [PATCH] drm/xe: Remove unnecessary memory barriers related to wait queue Matthew Brost
2023-07-27 20:40 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-07-27 20:41 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-07-27 20:42 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-07-28 12:13 ` [Intel-xe] [PATCH] " Matthew Auld
2023-07-28 14:52   ` Matthew Brost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox