[Intel-gfx] [bug report] drm/i915/gt: Replace direct submit with direct call to tasklet

Dan Carpenter dan.carpenter at oracle.com
Fri Dec 10 13:35:20 UTC 2021


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
Smatch static checker warning:

	drivers/gpu/drm/i915/gt/selftest_lrc.c:1616 garbage_reset()
	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();
                 ^^^^^^^^^^^^^^^^^^
Disables preempt

    1615         if (!test_and_set_bit(bit, lock)) {
--> 1616                 tasklet_disable(&engine->sched_engine->tasklet);
                         ^^^^^^^^^^^^^^^
This calls tasklet_unlock_wait() which is a sleeping function

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

regards,
dan carpenter


More information about the Intel-gfx mailing list