* [Intel-gfx] [bug report] drm/i915/gt: Replace direct submit with direct call to tasklet
@ 2021-07-27 9:03 Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-07-27 9:03 UTC (permalink / raw)
To: chris; +Cc: intel-gfx
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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Intel-gfx] [bug report] drm/i915/gt: Replace direct submit with direct call to tasklet
@ 2021-12-10 13:35 Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-12-10 13:35 UTC (permalink / raw)
To: chris; +Cc: intel-gfx
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-10 13:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-10 13:35 [Intel-gfx] [bug report] drm/i915/gt: Replace direct submit with direct call to tasklet Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2021-07-27 9:03 Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox