Re: [PATCH 33/47] drm/i915/guc: Add disable interrupts to guc sanitize

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

 



On 6/24/2021 00:05, Matthew Brost wrote:
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@xxxxxxxxx>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx
Reviewed-by: John Harrison <John.C.Harrison@xxxxxxxxx>

---
  drivers/gpu/drm/i915/gt/uc/intel_guc.h | 16 ++++++++++++++++
  drivers/gpu/drm/i915/gt/uc/intel_uc.c  | 21 +++------------------
  2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
index 40c9868762d7..85ef6767f13b 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
@@ -217,9 +217,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;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index f0b02200aa01..ab11fe731ee7 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -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 */




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux