From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 2/2] drm/i915: kill cargo-culted locking from power well code
Date: Wed, 30 Jan 2013 15:59:57 +0100 [thread overview]
Message-ID: <1359557997-20308-2-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1359557997-20308-1-git-send-email-daniel.vetter@ffwll.ch>
We may not concurrently change the power wells code. Which
is already guaranteed since modesets aren't concurrent. That
leaves races against setup/teardown/suspend/resume, and for
those we already (try) rather hard not to hit concurrent
modesets.
No debug WARN_ON added since that would require us to grab the
modeset locks in init/suspend code. Which is again just cargo
culting since just grabbing the locks in those paths isn't good
enough, we need the right order of operations, too.
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/intel_pm.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 703219c..f024e7d 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4091,8 +4091,6 @@ void intel_init_power_well(struct drm_device *dev)
if (!IS_HASWELL(dev))
return;
- mutex_lock(&dev->struct_mutex);
-
/* For now, we need the power well to be always enabled. */
intel_set_power_well(dev, true);
@@ -4100,8 +4098,6 @@ void intel_init_power_well(struct drm_device *dev)
* the driver is in charge now. */
if (I915_READ(HSW_PWR_WELL_BIOS) & HSW_PWR_WELL_ENABLE)
I915_WRITE(HSW_PWR_WELL_BIOS, 0);
-
- mutex_unlock(&dev->struct_mutex);
}
/* Set up chip specific power management-related functions */
--
1.7.10.4
next prev parent reply other threads:[~2013-01-30 14:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 14:59 [PATCH 1/2] drm/i915: don't run hsw power well code on !hsw Daniel Vetter
2013-01-30 14:59 ` Daniel Vetter [this message]
2013-01-30 17:40 ` [PATCH 2/2] drm/i915: kill cargo-culted locking from power well code Rodrigo Vivi
2013-01-30 15:55 ` [PATCH 1/2] drm/i915: don't run hsw power well code on !hsw Sedat Dilek
2013-01-30 18:57 ` Paulo Zanoni
2013-01-30 19:04 ` 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=1359557997-20308-2-git-send-email-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
/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).