All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Always catch incorrect usage of intel_runtime_pm_get
@ 2018-02-12  9:01 Tvrtko Ursulin
  2018-02-12  9:05 ` Chris Wilson
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Tvrtko Ursulin @ 2018-02-12  9:01 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Put an explicit might_sleep at the start of intel_runtime_pm_get so we
always catch incorrect usage, regardless of the code path taken in
pm_runtime_get_sync.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_runtime_pm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 70e659772a7a..338dbfd7d228 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -3188,6 +3188,12 @@ void intel_runtime_pm_get(struct drm_i915_private *dev_priv)
 	struct device *kdev = &pdev->dev;
 	int ret;
 
+	/*
+	 * Catch incorrect usage regardless of the code path taken in
+	 * pm_runtime_get_sync.
+	 */
+	might_sleep();
+
 	ret = pm_runtime_get_sync(kdev);
 	WARN_ONCE(ret < 0, "pm_runtime_get_sync() failed: %d\n", ret);
 
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-02-12 21:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12  9:01 [PATCH] drm/i915: Always catch incorrect usage of intel_runtime_pm_get Tvrtko Ursulin
2018-02-12  9:05 ` Chris Wilson
2018-02-12  9:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-02-12 15:42 ` Patchwork
2018-02-12 17:48 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-12 21:00 ` ✗ Fi.CI.IGT: failure " Patchwork

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.