public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: chris@chris-wilson.co.uk
Cc: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [bug report] drm/i915/gt: Replace direct submit with direct call to tasklet
Date: Tue, 27 Jul 2021 12:03:04 +0300	[thread overview]
Message-ID: <20210727090304.GA23612@kili> (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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2021-07-27  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  9:03 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-10 13:35 [Intel-gfx] [bug report] drm/i915/gt: Replace direct submit with direct call to tasklet Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210727090304.GA23612@kili \
    --to=dan.carpenter@oracle.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox