From: Chris Wilson <chris@chris-wilson.co.uk>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 2/8] drm/i915: fixup up debugfs rps state handling
Date: Thu, 09 Aug 2012 10:32:21 +0100 [thread overview]
Message-ID: <1344504744_63017@CP5-2952> (raw)
In-Reply-To: <1344461740-1231-3-git-send-email-daniel.vetter@ffwll.ch>
On Wed, 8 Aug 2012 23:35:34 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> - Take the dev->struct_mutex around access the corresponding state
> (and adjusting the rps hw state).
> - Add an assert to gen6_set_rps to ensure we don't forget about this
> in the future.
> - Don't set up the min/max_freq files if it doesn't apply to the hw.
> And do the same for the gen6+ cache sharing file while at it.
>
> v2: Move the gen6+ checks into the read/write callbacks. Thanks to the
> awesome drm midlayer we can't check that when registering the debugfs
> files, because the driver is not yet fully set up, specifically the
> ->load callback hasn't run yet.
>
> Oh how I despise this disaster ...
>
> v3: Also add a WARN_ON(mutex_is_locked) in set_rps to check the
> locking.
>
> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> (for v2)
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 27 +++++++++++++++++++++++++++
> drivers/gpu/drm/i915/intel_pm.c | 2 ++
> 2 files changed, 29 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 1312b79..2499610 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1710,8 +1710,13 @@ i915_max_freq_read(struct file *filp,
> char buf[80];
> int len;
>
> + if (!(IS_GEN6(dev) || IS_GEN7(dev)))
> + return -ENODEV;
> +
> + mutex_lock(&dev->struct_mutex);
In debugfs, I advise that we use mutex_lock_interruptible().
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-08-09 9:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-08 21:35 [PATCH 0/8] rps locking fixes v2 Daniel Vetter
2012-08-08 21:35 ` [PATCH 1/8] drm/i915: properly guard ilk ips state Daniel Vetter
2012-08-09 14:44 ` [PATCH] " Daniel Vetter
2012-08-08 21:35 ` [PATCH 2/8] drm/i915: fixup up debugfs rps state handling Daniel Vetter
2012-08-09 9:32 ` Chris Wilson [this message]
2012-08-09 13:07 ` [PATCH 1/2] " Daniel Vetter
2012-08-09 13:07 ` [PATCH 2/2] drm/i915: use mutex_lock_interruptible for debugfs files Daniel Vetter
2012-08-09 20:18 ` Ben Widawsky
2012-08-08 21:35 ` [PATCH 3/8] drm/i915: move all rps state into dev_priv->rps Daniel Vetter
2012-08-08 21:35 ` [PATCH 4/8] drm/i915: kill dev_priv->mchdev_lock Daniel Vetter
2012-08-08 21:35 ` [PATCH 5/8] drm/i915: DE_PCU_EVENT irq is ilk-only Daniel Vetter
2012-08-08 21:35 ` [PATCH 6/8] drm/i915: fix up ilk drps/ips locking Daniel Vetter
2012-08-09 14:46 ` [PATCH] " Daniel Vetter
2012-08-08 21:35 ` [PATCH 7/8] drm/ips: move drps/ips/ilk related variables into dev_priv->ips Daniel Vetter
2012-08-28 16:14 ` Daniel Vetter
2012-08-08 21:35 ` [PATCH 8/8] drm/i915: enable rc6 on ilk again Daniel Vetter
2012-08-09 20:26 ` Ben Widawsky
2012-08-09 9:43 ` [PATCH 0/8] rps locking fixes v2 Chris Wilson
2012-08-09 11:48 ` Daniel Vetter
2012-08-09 14:58 ` Lespiau, Damien
2012-08-09 20:36 ` Daniel Vetter
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=1344504744_63017@CP5-2952 \
--to=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--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).