drm/xe/guc: Only take actions in CT irq handler if CTs are enabled
authorMatthew Brost <matthew.brost@intel.com>
Tue, 2 Jan 2024 20:35:38 +0000 (12:35 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Tue, 9 Jan 2024 14:56:46 +0000 (06:56 -0800)
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

index f15f8a4857e07e12c036c4f6f72736c9527e52ff..9ecb67db8ec404cc3a664b81a8418fd3518fde29 100644 (file)
@@ -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);
 }