]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/guc: Add disable interrupts to guc sanitize
authorMatthew Brost <matthew.brost@intel.com>
Tue, 27 Jul 2021 00:23:25 +0000 (17:23 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Wed, 28 Jul 2021 00:31:47 +0000 (17:31 -0700)
Add disable GuC interrupts to intel_guc_sanitize(). Part of this
requires moving the guc_*_interrupt wrapper function into header file
intel_guc.h.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210727002348.97202-11-matthew.brost@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc.h
drivers/gpu/drm/i915/gt/uc/intel_uc.c

index a068e32626762806342326762069ba485b8f0f26..7b871f675e48c7f40e9b9682a8fb62ad27e63f2f 100644 (file)
@@ -224,9 +224,25 @@ static inline bool intel_guc_is_ready(struct intel_guc *guc)
        return intel_guc_is_fw_running(guc) && intel_guc_ct_enabled(&guc->ct);
 }
 
+static inline void intel_guc_reset_interrupts(struct intel_guc *guc)
+{
+       guc->interrupts.reset(guc);
+}
+
+static inline void intel_guc_enable_interrupts(struct intel_guc *guc)
+{
+       guc->interrupts.enable(guc);
+}
+
+static inline void intel_guc_disable_interrupts(struct intel_guc *guc)
+{
+       guc->interrupts.disable(guc);
+}
+
 static inline int intel_guc_sanitize(struct intel_guc *guc)
 {
        intel_uc_fw_sanitize(&guc->fw);
+       intel_guc_disable_interrupts(guc);
        intel_guc_ct_sanitize(&guc->ct);
        guc->mmio_msg = 0;
 
index 9a5ef1dca02242b437a7c60eaf64e0942702dd54..05a2001afde9cc962b779ccf7b09269233481b9e 100644 (file)
@@ -207,21 +207,6 @@ static void guc_handle_mmio_msg(struct intel_guc *guc)
        spin_unlock_irq(&guc->irq_lock);
 }
 
-static void guc_reset_interrupts(struct intel_guc *guc)
-{
-       guc->interrupts.reset(guc);
-}
-
-static void guc_enable_interrupts(struct intel_guc *guc)
-{
-       guc->interrupts.enable(guc);
-}
-
-static void guc_disable_interrupts(struct intel_guc *guc)
-{
-       guc->interrupts.disable(guc);
-}
-
 static int guc_enable_communication(struct intel_guc *guc)
 {
        struct intel_gt *gt = guc_to_gt(guc);
@@ -242,7 +227,7 @@ static int guc_enable_communication(struct intel_guc *guc)
        guc_get_mmio_msg(guc);
        guc_handle_mmio_msg(guc);
 
-       guc_enable_interrupts(guc);
+       intel_guc_enable_interrupts(guc);
 
        /* check for CT messages received before we enabled interrupts */
        spin_lock_irq(&gt->irq_lock);
@@ -265,7 +250,7 @@ static void guc_disable_communication(struct intel_guc *guc)
         */
        guc_clear_mmio_msg(guc);
 
-       guc_disable_interrupts(guc);
+       intel_guc_disable_interrupts(guc);
 
        intel_guc_ct_disable(&guc->ct);
 
@@ -463,7 +448,7 @@ static int __uc_init_hw(struct intel_uc *uc)
        if (ret)
                goto err_out;
 
-       guc_reset_interrupts(guc);
+       intel_guc_reset_interrupts(guc);
 
        /* WaEnableuKernelHeaderValidFix:skl */
        /* WaEnableGuCBootHashCheckNotSet:skl,bxt,kbl */