intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: intel-gfx@lists.freedesktop.org
Subject: force wake reference counting (another try)
Date: Mon, 11 Apr 2011 18:01:15 -0700	[thread overview]
Message-ID: <1302570079-17032-1-git-send-email-ben@bwidawsk.net> (raw)


Contrary to the discussion on IRC, I have decided not to add
config.mutex as part of the warning criteria. Upon further thought, it
just seemed incorrect to me. This patch series implies that all register
reads which may require a forcewake must now hold struct_mutex, ie. make
struct_mutex more global. The alternative is to invent a new lock for
forcewake which must be acquired prior to said register reads.

I know, that sucks. It has implications on non-SNB platforms, and that
is exactly what I was hoping to avoid. The current code is dangerous. If
two threads need register reads requiring forcewake but aren't
protected by the same mutex, it will lead to unpredictable register
reads (I can't think of a case where it will actually work correctly).

So once again, I expect this patch to potentially generate a lot of
warnings, but I consider all of those warnings to be serious bugs for
SNB.

If anyone has clever ideas on how to handle this outside of what I've
already mentioned, please let me know.

I expect ongoing patches to fix these issues as they come up.

Ben

             reply	other threads:[~2011-04-12  1:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12  1:01 Ben Widawsky [this message]
2011-04-12  1:01 ` [PATCH 1/4] drm/i915: proper use of forcewake Ben Widawsky
2011-04-12  1:01 ` [PATCH 2/4] drm/i915: refcounts for forcewake Ben Widawsky
2011-04-12  1:01 ` [PATCH 3/4] drm/i915: userspace interface to the forcewake refcount Ben Widawsky
2011-04-12  1:01 ` [PATCH 4/4] drm/i915: fewer warning patch (temporary) Ben Widawsky
2011-04-12  8:02 ` force wake reference counting (another try) Chris Wilson
2011-04-12 16:30   ` Ben Widawsky
2011-04-12 16:56     ` Keith Packard
2011-04-12 17:21       ` Chris Wilson
2011-04-12 17:41         ` Keith Packard
2011-04-13  1:31           ` Ben Widawsky
2011-04-13  5:31             ` Keith Packard
2011-04-13  5:52             ` Chris Wilson
2011-04-13  6:35               ` Ben Widawsky

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=1302570079-17032-1-git-send-email-ben@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --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;
as well as URLs for NNTP newsgroup(s).