Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/guc: Only take actions in CT irq handler if CTs are enabled
@ 2024-01-02 21:43 Matthew Brost
  2024-01-03 13:31 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Matthew Brost @ 2024-01-02 21:43 UTC (permalink / raw)
  To: intel-xe

Protect entire IRQ handler by CT being enabled rather than just G2H
handler.

Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ct.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_ct.h b/drivers/gpu/drm/xe/xe_guc_ct.h
index f15f8a4857e0..05302db02e08 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.h
+++ b/drivers/gpu/drm/xe/xe_guc_ct.h
@@ -24,10 +24,11 @@ void xe_guc_ct_print(struct xe_guc_ct *ct, struct drm_printer *p, bool atomic);
 
 static inline void xe_guc_ct_irq_handler(struct xe_guc_ct *ct)
 {
-	wake_up_all(&ct->wq);
-	if (ct->enabled)
+	if (ct->enabled) {
+		wake_up_all(&ct->wq);
 		queue_work(system_unbound_wq, &ct->g2h_worker);
-	xe_guc_ct_fast_path(ct);
+		xe_guc_ct_fast_path(ct);
+	}
 }
 
 /* Basic CT send / receives */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [PATCH] drm/xe/guc: Only take actions in CT irq handler if CTs are enabled
@ 2024-01-05 20:25 Matthew Brost
  0 siblings, 0 replies; 12+ messages in thread
From: Matthew Brost @ 2024-01-05 20:25 UTC (permalink / raw)
  To: intel-xe

Protect entire IRQ handler by CT being enabled rather than just G2H
handler.

v2: Return on not enabled in CT irq handler (Michal)

Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ct.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_ct.h b/drivers/gpu/drm/xe/xe_guc_ct.h
index f15f8a4857e0..05302db02e08 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.h
+++ b/drivers/gpu/drm/xe/xe_guc_ct.h
@@ -24,10 +24,11 @@ void xe_guc_ct_print(struct xe_guc_ct *ct, struct drm_printer *p, bool atomic);
 
 static inline void xe_guc_ct_irq_handler(struct xe_guc_ct *ct)
 {
-	wake_up_all(&ct->wq);
-	if (ct->enabled)
+	if (ct->enabled) {
+		wake_up_all(&ct->wq);
 		queue_work(system_unbound_wq, &ct->g2h_worker);
-	xe_guc_ct_fast_path(ct);
+		xe_guc_ct_fast_path(ct);
+	}
 }
 
 /* Basic CT send / receives */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [PATCH] drm/xe/guc: Only take actions in CT irq handler if CTs are enabled
@ 2024-01-05 20:34 Matthew Brost
  0 siblings, 0 replies; 12+ messages in thread
From: Matthew Brost @ 2024-01-05 20:34 UTC (permalink / raw)
  To: intel-xe

Protect entire IRQ handler by CT being enabled rather than just G2H
handler.

v2: Return on not enabled in CT irq handler (Michal)

Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ct.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_ct.h b/drivers/gpu/drm/xe/xe_guc_ct.h
index f15f8a4857e0..9ecb67db8ec4 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.h
+++ b/drivers/gpu/drm/xe/xe_guc_ct.h
@@ -24,9 +24,11 @@ void xe_guc_ct_print(struct xe_guc_ct *ct, struct drm_printer *p, bool atomic);
 
 static inline void xe_guc_ct_irq_handler(struct xe_guc_ct *ct)
 {
+	if (!ct->enabled)
+		return;
+
 	wake_up_all(&ct->wq);
-	if (ct->enabled)
-		queue_work(system_unbound_wq, &ct->g2h_worker);
+	queue_work(system_unbound_wq, &ct->g2h_worker);
 	xe_guc_ct_fast_path(ct);
 }
 
-- 
2.34.1


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

end of thread, other threads:[~2024-01-05 20:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-02 21:43 [PATCH] drm/xe/guc: Only take actions in CT irq handler if CTs are enabled Matthew Brost
2024-01-03 13:31 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-03 13:32 ` ✓ CI.checkpatch: " Patchwork
2024-01-03 13:32 ` ✓ CI.KUnit: " Patchwork
2024-01-03 13:40 ` ✓ CI.Build: " Patchwork
2024-01-03 13:40 ` ✓ CI.Hooks: " Patchwork
2024-01-03 13:42 ` ✓ CI.checksparse: " Patchwork
2024-01-03 14:16 ` ✓ CI.BAT: " Patchwork
2024-01-05 19:59 ` [PATCH] " Michal Wajdeczko
2024-01-05 20:12   ` Matthew Brost
  -- strict thread matches above, loose matches on Subject: below --
2024-01-05 20:25 Matthew Brost
2024-01-05 20:34 Matthew Brost

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