public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Enable runtime pm
@ 2017-11-07 16:18 Daniel Vetter
  2017-11-07 16:38 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Daniel Vetter @ 2017-11-07 16:18 UTC (permalink / raw)
  To: Intel Graphics Development
  Cc: Zanoni, Paulo R, Takashi Iwai, Daniel Vetter, Kaskinen, Tanu,
	Liam Girdwood, Daniel Vetter

Now that we have CI, and that pm_rpm fully passes (I guess the audio
folks have implemented proper runtime pm for snd-hda, hooray, pls
confirm) it's time to enable this again by default.

Real goal here is to have 1 configuration only that we fully support,
instead of tons of different codes with every user/customer tuning it
differently. And really, power stuff should work by default, and
should be enabled by everywhere where it is save to do so.

v2: Completely new commit message, a few years passed since v1 ...

Cc: Takashi Iwai <tiwai@suse.de>
Cc: Liam Girdwood <liam.r.girdwood@intel.com>
Cc: "Yang, Libin" <libin.yang@intel.com>
Cc: "Lin, Mengdong" <mengdong.lin@intel.com>
Cc: "Li, Jocelyn" <jocelyn.li@intel.com>
Cc: "Kaskinen, Tanu" <tanu.kaskinen@intel.com>
Cc: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/intel_runtime_pm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 8315499452dc..dc24d008d8d4 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -3232,7 +3232,7 @@ void intel_runtime_pm_enable(struct drm_i915_private *dev_priv)
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 	struct device *kdev = &pdev->dev;
 
-	pm_runtime_set_autosuspend_delay(kdev, 10000); /* 10s */
+	pm_runtime_set_autosuspend_delay(kdev, 100);
 	pm_runtime_mark_last_busy(kdev);
 
 	/*
@@ -3251,6 +3251,8 @@ void intel_runtime_pm_enable(struct drm_i915_private *dev_priv)
 		pm_runtime_use_autosuspend(kdev);
 	}
 
+	pm_runtime_allow(kdev);
+
 	/*
 	 * The core calls the driver load handler with an RPM reference held.
 	 * We drop that here and will reacquire it during unloading in
-- 
2.15.0.rc2

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

^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [PATCH] drm/i915: Enable runtime pm
@ 2015-05-08 18:51 Daniel Vetter
  2015-05-09 14:59 ` shuang.he
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Daniel Vetter @ 2015-05-08 18:51 UTC (permalink / raw)
  To: Intel Graphics Development
  Cc: Yang, Libin, Zanoni, Paulo R, Takashi Iwai, Daniel Vetter,
	Kaskinen, Tanu, Liam Girdwood, Daniel Vetter

Like with every other feature that's not enabled by default we break
runtime pm support way too often by accident because the overall test
coverage isn't great. And it's been almost 2 years since we enabled
the power well code by default

commit bf51d5e2cda5d36d98e4b46ac7fca9461e512c41
Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
Date:   Wed Jul 3 17:12:13 2013 -0300

    drm/i915: switch disable_power_well default value to 1

It's really more than overdue for runtime pm itself to follow!

Note that in practice this wont do a hole lot yet, since we're still
gated on snd-hda-intel doing proper runtime pm. But I've discussed
this with Liam and we agreed that this needs to be done. And the audio
team is working to hold up their end of this bargain.

And the justification for updating the autosuspend delay to 100ms:
Quick measurment shows that we can do a full rpm cycle in about 5ms,
which means the delay should still be really conservative from a power
conservation pov. The only workload that would suffer from ping-pong
is also only gpu/compute with all screens off. 100ms should cover any
kind of latency with submitting follow-up batches.

Cc: Takashi Iwai <tiwai@suse.de>
Cc: Liam Girdwood <liam.r.girdwood@intel.com>
Cc: Yang, Libin <libin.yang@intel.com>
Cc: Lin, Mengdong <mengdong.lin@intel.com>
Cc: Li, Jocelyn <jocelyn.li@intel.com>
Cc: Kaskinen, Tanu <tanu.kaskinen@intel.com>
Cc: Zanoni, Paulo R <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/intel_runtime_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 317b9b43d1c1..36ecbe275dd9 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -1919,9 +1919,10 @@ void intel_runtime_pm_enable(struct drm_i915_private *dev_priv)
 		return;
 	}
 
-	pm_runtime_set_autosuspend_delay(device, 10000); /* 10s */
+	pm_runtime_set_autosuspend_delay(device, 100);
 	pm_runtime_mark_last_busy(device);
 	pm_runtime_use_autosuspend(device);
+	pm_runtime_allow(device);
 
 	pm_runtime_put_autosuspend(device);
 }
-- 
2.1.0

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

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

end of thread, other threads:[~2017-11-17  8:39 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-07 16:18 [PATCH] drm/i915: Enable runtime pm Daniel Vetter
2017-11-07 16:38 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-11-07 16:45 ` [PATCH] " Jani Nikula
2017-11-07 16:53   ` Daniel Vetter
2017-11-08 12:24 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-11-08 14:25 ` [PATCH] " David Weinehall
2017-11-16 18:24   ` David Weinehall
2017-11-16 20:45     ` Paulo Zanoni
2017-11-16 21:11       ` Chris Wilson
2017-11-17  8:39     ` David Weinehall
  -- strict thread matches above, loose matches on Subject: below --
2015-05-08 18:51 Daniel Vetter
2015-05-09 14:59 ` shuang.he
2015-05-12 17:40 ` Jesse Barnes
2015-06-16  8:34 ` Daniel Vetter
2015-06-16 10:42   ` Liam Girdwood
2015-06-18  7:46     ` Yang, Libin
2015-06-16 12:23   ` Paulo Zanoni
2015-06-16 12:26     ` Paulo Zanoni
2015-06-16 18:40       ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox