<div class="gmail_quote">On Fri, Apr 20, 2012 at 05:59, Chris Wilson <span dir="ltr"><<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

From: Jesse Barnes <<a href="mailto:jbarnes@virtuousgeek.org">jbarnes@virtuousgeek.org</a>><br>
<br>
PCH PLLs aren't required for outputs on the CPU, so we shouldn't just<br>
treat them as part of the pipe.<br>
<br>
So split the code out and manage PCH PLLs separately, allocating them<br>
when needed or trying to re-use existing PCH PLL setups when the timings<br>
match.<br>
<br>
v2: add num_pch_pll field to dev_priv (Daniel)<br>
    don't NULL the pch_pll pointer in disable or DPMS will fail (Jesse)<br>
    put register offsets in pll struct (Chris)<br>
<br>
v3: Decouple enable/disable of PLLs from get/put.<br>
v4: Track temporary PLL disabling during modeset<br>
<br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=44309" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=44309</a><br>
Signed-off-by: Jesse Barnes <<a href="mailto:jbarnes@virtuousgeek.org">jbarnes@virtuousgeek.org</a>> (up to v2)<br>
Signed-off-by: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>> (v3+)<br></blockquote><div><br></div><div>Chris, Jesse, I also needed the following hunk below in my tree to cope with Lynx Point. Do you want me to send it as a separate patch or you could grab it into v5?</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
 drivers/gpu/drm/i915/i915_drv.c      |    4 +<br>
 drivers/gpu/drm/i915/i915_drv.h      |    4 +<br>
 drivers/gpu/drm/i915/i915_reg.h      |    6 +-<br>
 drivers/gpu/drm/i915/i915_suspend.c  |    2 +-<br>
 drivers/gpu/drm/i915/intel_display.c |  276 +++++++++++++++++++++++++---------<br>
 drivers/gpu/drm/i915/intel_dp.c      |    1 +<br>
 drivers/gpu/drm/i915/intel_drv.h     |   13 +-<br>
 7 files changed, 225 insertions(+), 81 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c<br>
index 3effcf7..355bd68 100644<br>
--- a/drivers/gpu/drm/i915/i915_drv.c<br>
+++ b/drivers/gpu/drm/i915/i915_drv.c<br>+static int intel_pch_pll_init(struct drm_device *dev)<br>
+{<br>
+       drm_i915_private_t *dev_priv = dev->dev_private;<br>
+       struct intel_pch_pll *pch_plls;<br>
+       int i;<br></blockquote><div><br></div><div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>if (dev_priv->num_pch_pll == 0) {</div><div>+<span class="Apple-tab-span" style="white-space:pre">                </span>DRM_DEBUG_DRIVER("No PCH PLL available, skipping initialization\n");</div>

<div>+<span class="Apple-tab-span" style="white-space:pre">             </span>return 0;</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>}</div><div>+</div></div><div><br></div><div>It would work otherwise, but it would give -ENOMEM which is misleading in this case I think.</div>

<div><br></div></div>-- <br>Eugeni Dodonov<a href="http://eugeni.dodonov.net/" target="_blank"><br></a><br>