drm/i915/guc: Add disable interrupts to guc sanitize
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
This commit is contained in:
parent
c41ee2873e
commit
e5a1ad0359
@ -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;
|
||||
|
||||
|
@ -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(>->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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user