Skip to contentSkip to conversation

drm/i915/gt: Replace direct submit with direct call to tasklet

Intel-gfx Dan Carpenter 1 participant 1 message Jul 27, 2021

lore
Share & tools
lore
#0 lore raw

Hello Chris Wilson,

The patch 16f2941ad307: "drm/i915/gt: Replace direct submit with direct call to tasklet" from Dec 24, 2020, leads to the following static checker warning:

kernel/softirq.c:887 tasklet_unlock_wait()
warn: sleeping in atomic context

drivers/gpu/drm/i915/gt/selftest_lrc.c
1608 static void garbage_reset(struct intel_engine_cs *engine,
1609 struct i915_request *rq)
1610 {
1611 const unsigned int bit = I915_RESET_ENGINE + engine->id;
1612 unsigned long *lock = &engine->gt->reset.flags;
1613

  1614          local_bh_disable();
                ^^^^^^^^^^^^^^^^^^

This bumps the preempt_count.

1615 if (!test_and_set_bit(bit, lock)) {

  1616                  tasklet_disable(&engine->execlists.tasklet);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tasklet_disable calls tasklet_unlock_wait() which can sleep.

  1617  
  1618                  if (!rq->fence.error)
  1619                          __intel_engine_reset_bh(engine, NULL);
  1620  
  1621                  tasklet_enable(&engine->execlists.tasklet);
  1622                  clear_and_wake_up_bit(bit, lock);
  1623          }
  1624          local_bh_enable();
  1625  }

regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx