All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ben Widawsky <ben@bwidawsk.net>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915: fix ilk rc6 teardown locking
Date: Sat, 19 Mar 2011 07:44:24 +0000	[thread overview]
Message-ID: <b9dded$iah4v5@orsmga002.jf.intel.com> (raw)
In-Reply-To: <1300489968-8574-2-git-send-email-ben@bwidawsk.net>

On Fri, 18 Mar 2011 16:12:45 -0700, Ben Widawsky <ben@bwidawsk.net> wrote:
> In the failure cases during rc6 initialization, both the power context
> and render context may get !refcount without holding struct_mutex.
> 
> However, on rc6 disabling, the lock is held by the caller.
> 
> Added a simple parameter to control whether or not to acquire the lock.

I have an aversion to passing parameters around to control locking.
Considering that we modify dev_private and adjust LP_RING during enable,
wouldn't it be prudent to move that under the struct mutex? Especially in
the future if we allow it be enabled at runtime.

Failing that: bool was_locked = mutex_is_locked(&dev->struct_mutex);
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2011-03-19  7:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 23:12 [PATCH 0/4] Re-enable RC6 on Ironlake Ben Widawsky
2011-03-18 23:12 ` [PATCH 1/4] drm/i915: fix ilk rc6 teardown locking Ben Widawsky
2011-03-19  7:44   ` Chris Wilson [this message]
2011-03-19 18:38     ` [PATCH v2 " Ben Widawsky
2011-03-19 18:46     ` [PATCH " Keith Packard
2011-03-20  1:14     ` [PATCH v2 1/5] " Ben Widawsky
2011-03-20  1:14     ` [PATCH v2 2/5] drm/1915: ringbuffer wait for idle function Ben Widawsky
2011-03-20  1:14     ` [PATCH v2 3/5] drm/i915: fix rc6 initialization on Ironlake Ben Widawsky
2011-03-20  1:14     ` [PATCH v2 4/5] drm/i915: debugfs for context information Ben Widawsky
2011-03-20  1:14     ` [PATCH v2 5/5] drm/i915: re-enable rc6 for ironlake Ben Widawsky
2011-03-18 23:12 ` [PATCH 2/4] drm/i915: fix rc6 initialization on Ironlake Ben Widawsky
2011-03-19  7:55   ` Chris Wilson
2011-03-20  0:07     ` Ben Widawsky
2011-03-18 23:12 ` [PATCH 3/4] drm/i915: debugfs for context information Ben Widawsky
2011-03-18 23:12 ` [PATCH 4/4] drm/i915: re-enable rc6 for ironlake Ben Widawsky
2011-04-27  7:49   ` Chris Wilson
2011-04-27 21:20     ` Jesse Barnes
2011-04-27 22:03       ` Chris Wilson
2011-04-27 22:49         ` Jesse Barnes
2011-04-28 17:10           ` 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='b9dded$iah4v5@orsmga002.jf.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.