intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* force wake reference counting (another try)
@ 2011-04-12  1:01 Ben Widawsky
  2011-04-12  1:01 ` [PATCH 1/4] drm/i915: proper use of forcewake Ben Widawsky
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Ben Widawsky @ 2011-04-12  1:01 UTC (permalink / raw)
  To: intel-gfx


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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-04-13  6:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-12  1:01 force wake reference counting (another try) Ben Widawsky
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

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).