diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_engine_pm.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_pm.c b/drivers/gpu/drm/i915/gt/intel_engine_pm.c index 5f03f7dcad72..a372d4ea9370 100644 --- a/drivers/gpu/drm/i915/gt/intel_engine_pm.c +++ b/drivers/gpu/drm/i915/gt/intel_engine_pm.c @@ -37,9 +37,15 @@ static int __engine_unpark(struct intel_wakeref *wf) return 0; } +#if IS_ENABLED(CONFIG_LOCKDEP) + static inline void __timeline_mark_lock(struct intel_context *ce) { + unsigned long flags; + + local_irq_save(flags); mutex_acquire(&ce->timeline->mutex.dep_map, 2, 0, _THIS_IP_); + local_irq_restore(flags); } static inline void __timeline_mark_unlock(struct intel_context *ce) @@ -47,6 +53,18 @@ static inline void __timeline_mark_unlock(struct intel_context *ce) mutex_release(&ce->timeline->mutex.dep_map, 0, _THIS_IP_); } +#else + +static inline void __timeline_mark_lock(struct intel_context *ce) +{ +} + +static inline void __timeline_mark_unlock(struct intel_context *ce) +{ +} + +#endif /* !IS_ENABLED(CONFIG_LOCKDEP) */ + static bool switch_to_kernel_context(struct intel_engine_cs *engine) { struct i915_request *rq; |