patch-5.15.79-rt54.patch
[platform/kernel/linux-rpi.git] / drivers / gpu / drm / i915 / gt / intel_engine_pm.c
index dacd627..73e96ca 100644 (file)
@@ -80,39 +80,6 @@ static int __engine_unpark(struct intel_wakeref *wf)
        return 0;
 }
 
-#if IS_ENABLED(CONFIG_LOCKDEP)
-
-static unsigned long __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_);
-
-       return flags;
-}
-
-static void __timeline_mark_unlock(struct intel_context *ce,
-                                  unsigned long flags)
-{
-       mutex_release(&ce->timeline->mutex.dep_map, _THIS_IP_);
-       local_irq_restore(flags);
-}
-
-#else
-
-static unsigned long __timeline_mark_lock(struct intel_context *ce)
-{
-       return 0;
-}
-
-static void __timeline_mark_unlock(struct intel_context *ce,
-                                  unsigned long flags)
-{
-}
-
-#endif /* !IS_ENABLED(CONFIG_LOCKDEP) */
-
 static void duration(struct dma_fence *fence, struct dma_fence_cb *cb)
 {
        struct i915_request *rq = to_request(fence);
@@ -159,7 +126,6 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine)
 {
        struct intel_context *ce = engine->kernel_context;
        struct i915_request *rq;
-       unsigned long flags;
        bool result = true;
 
        /* GPU is pointing to the void, as good as in the kernel context. */
@@ -201,7 +167,7 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine)
         * engine->wakeref.count, we may see the request completion and retire
         * it causing an underflow of the engine->wakeref.
         */
-       flags = __timeline_mark_lock(ce);
+       set_bit(CONTEXT_IS_PARKED, &ce->flags);
        GEM_BUG_ON(atomic_read(&ce->timeline->active_count) < 0);
 
        rq = __i915_request_create(ce, GFP_NOWAIT);
@@ -233,7 +199,7 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine)
 
        result = false;
 out_unlock:
-       __timeline_mark_unlock(ce, flags);
+       clear_bit(CONTEXT_IS_PARKED, &ce->flags);
        return result;
 }