<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 01/22/2014 07:14 PM, Paulo Zanoni
wrote:<br>
</div>
<blockquote
cite="mid:CA+gsUGR3K-rzsCGgsfffy=VOBUcakSKbenkKmLkB1YECrjdbJw@mail.gmail.com"
type="cite">
<pre wrap="">2014/1/22 <a class="moz-txt-link-rfc2396E" href="mailto:naresh.kumar.kachhi@intel.com"><naresh.kumar.kachhi@intel.com></a>:
</pre>
<blockquote type="cite">
<pre wrap="">From: Naresh Kumar Kachhi <a class="moz-txt-link-rfc2396E" href="mailto:naresh.kumar.kachhi@intel.com"><naresh.kumar.kachhi@intel.com></a>
with current code intel_runtime_pm_gpu_idle is getting called
even before runtime_pm is initialized. Moving runtime_pm_init
before i915_gem_init
Following is the call stack, note: by this time
runtime_pm was not initialized
intel_runtime_pm_gpu_idle+0x37/0x90
i915_gem_retire_requests+0x8d/0xa0
i915_gem_init_seqno+0x48/0x90
i915_gem_set_seqno+0x2a/0x70
i915_gem_init_hw+0x19c/0x300
?
i915_gem_context_init+0x123/0x220
i915_gem_init+0x57/0x1a0
i915_driver_load+0xbf4/0xd50
</pre>
</blockquote>
<pre wrap="">And why exactly is this a problem? Delaying intel_init_runtime_pm is a
nice thing because we don't want our driver trying to runtime suspend
while it's still being loaded.
</pre>
</blockquote>
<pre>pm.gpu_idle will be false (dev_priv is zeroed) until the init_runtime_pm is called.
In the call stack mentioned above we might see a call to intel_runtime_pm_gpu_idle.
If runtime pm is not initialized by now, pm.gpu_idle will be false and we will do a
runtime_put, without a matching runtime_get.
However in you patch
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><a href="http://lists.freedesktop.org/archives/intel-gfx/2013-December/037729.html">http://lists.freedesktop.org/archives/intel-gfx/2013-December/037729.html</a>, i saw
you have moved the initializing gpu_idle in intel_pm_setup, which will fix this problem.
We will not need this patch with your new patches.
only concern in this patch is that we are scattering the pm initialization across two
function (runtime_pm_init and pm_setup).
</pre>
<br>
<blockquote
cite="mid:CA+gsUGR3K-rzsCGgsfffy=VOBUcakSKbenkKmLkB1YECrjdbJw@mail.gmail.com"
type="cite">
<blockquote type="cite">
<pre wrap="">Signed-off-by: Naresh Kumar Kachhi <a class="moz-txt-link-rfc2396E" href="mailto:naresh.kumar.kachhi@intel.com"><naresh.kumar.kachhi@intel.com></a>
---
drivers/gpu/drm/i915/i915_dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index b5af745..85162da 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1511,6 +1511,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
mutex_init(&dev_priv->dpio_lock);
mutex_init(&dev_priv->modeset_restore_lock);
+ intel_init_runtime_pm(dev_priv);
+
intel_pm_setup(dev);
intel_display_crc_init(dev);
@@ -1674,8 +1676,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
if (IS_GEN5(dev))
intel_gpu_ips_init(dev_priv);
- intel_init_runtime_pm(dev_priv);
-
return 0;
out_power_well:
--
1.8.1.2
_______________________________________________
Intel-gfx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>