diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2018-03-20 18:14:19 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-03-21 15:07:15 +0000 |
commit | bc598425eb18d40a18f18d67f7c460189c43a3af (patch) | |
tree | 5ec57523d2665da14294b5ee6393f6a16a5cfd96 /drivers/gpu/drm/i915/intel_guc.h | |
parent | 154374c331b01acbaf6a6957a7f9e65192f6a459 (diff) | |
download | linux-stable-bc598425eb18d40a18f18d67f7c460189c43a3af.tar.gz linux-stable-bc598425eb18d40a18f18d67f7c460189c43a3af.tar.bz2 linux-stable-bc598425eb18d40a18f18d67f7c460189c43a3af.zip |
drm/i915/guc: Move enable/disable msg functions to GuC header
While today we are modifying GuC enabled msg mask only in GuC
log, this code should be defined as generic GuC to allow future
code reuse.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: MichaĆ Winiarski <michal.winiarski@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180320181419.35576-3-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_guc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h index 9a95d1518aa9..13f3d1dbf38d 100644 --- a/drivers/gpu/drm/i915/intel_guc.h +++ b/drivers/gpu/drm/i915/intel_guc.h @@ -155,4 +155,18 @@ static inline int intel_guc_sanitize(struct intel_guc *guc) return 0; } +static inline void intel_guc_enable_msg(struct intel_guc *guc, u32 mask) +{ + spin_lock_irq(&guc->irq_lock); + guc->msg_enabled_mask |= mask; + spin_unlock_irq(&guc->irq_lock); +} + +static inline void intel_guc_disable_msg(struct intel_guc *guc, u32 mask) +{ + spin_lock_irq(&guc->irq_lock); + guc->msg_enabled_mask &= ~mask; + spin_unlock_irq(&guc->irq_lock); +} + #endif |