<div dir="ltr">Reviewed-by: Rodrigo Vivi <<a href="mailto:rodrigo.vivi@intel.com">rodrigo.vivi@intel.com</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 19, 2014 at 12:04 PM, Paulo Zanoni <span dir="ltr"><<a href="mailto:przanoni@gmail.com" target="_blank">przanoni@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Paulo Zanoni <<a href="mailto:paulo.r.zanoni@intel.com">paulo.r.zanoni@intel.com</a>><br>
<br>
Because I plan to expand it a little bit.<br>
<br>
Signed-off-by: Paulo Zanoni <<a href="mailto:paulo.r.zanoni@intel.com">paulo.r.zanoni@intel.com</a>><br>
---<br>
drivers/gpu/drm/i915/intel_pm.c | 50 +++++++++++++++++++++++------------------<br>
1 file changed, 28 insertions(+), 22 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c<br>
index 1ec3c8f..2ca9fdb 100644<br>
--- a/drivers/gpu/drm/i915/intel_pm.c<br>
+++ b/drivers/gpu/drm/i915/intel_pm.c<br>
@@ -7358,33 +7358,39 @@ void intel_fini_runtime_pm(struct drm_i915_private *dev_priv)<br>
pm_runtime_disable(device);<br>
}<br>
<br>
+static void intel_init_fbc(struct drm_i915_private *dev_priv)<br>
+{<br>
+ if (!HAS_FBC(dev_priv))<br>
+ return;<br>
+<br>
+ if (INTEL_INFO(dev_priv)->gen >= 7) {<br>
+ dev_priv->display.fbc_enabled = ironlake_fbc_enabled;<br>
+ dev_priv->display.enable_fbc = gen7_enable_fbc;<br>
+ dev_priv->display.disable_fbc = ironlake_disable_fbc;<br>
+ } else if (INTEL_INFO(dev_priv)->gen >= 5) {<br>
+ dev_priv->display.fbc_enabled = ironlake_fbc_enabled;<br>
+ dev_priv->display.enable_fbc = ironlake_enable_fbc;<br>
+ dev_priv->display.disable_fbc = ironlake_disable_fbc;<br>
+ } else if (IS_GM45(dev_priv)) {<br>
+ dev_priv->display.fbc_enabled = g4x_fbc_enabled;<br>
+ dev_priv->display.enable_fbc = g4x_enable_fbc;<br>
+ dev_priv->display.disable_fbc = g4x_disable_fbc;<br>
+ } else {<br>
+ dev_priv->display.fbc_enabled = i8xx_fbc_enabled;<br>
+ dev_priv->display.enable_fbc = i8xx_enable_fbc;<br>
+ dev_priv->display.disable_fbc = i8xx_disable_fbc;<br>
+<br>
+ /* This value was pulled out of someone's hat */<br>
+ I915_WRITE(FBC_CONTROL, 500 << FBC_CTL_INTERVAL_SHIFT);<br>
+ }<br>
+}<br>
+<br>
/* Set up chip specific power management-related functions */<br>
void intel_init_pm(struct drm_device *dev)<br>
{<br>
struct drm_i915_private *dev_priv = dev->dev_private;<br>
<br>
- if (HAS_FBC(dev)) {<br>
- if (INTEL_INFO(dev)->gen >= 7) {<br>
- dev_priv->display.fbc_enabled = ironlake_fbc_enabled;<br>
- dev_priv->display.enable_fbc = gen7_enable_fbc;<br>
- dev_priv->display.disable_fbc = ironlake_disable_fbc;<br>
- } else if (INTEL_INFO(dev)->gen >= 5) {<br>
- dev_priv->display.fbc_enabled = ironlake_fbc_enabled;<br>
- dev_priv->display.enable_fbc = ironlake_enable_fbc;<br>
- dev_priv->display.disable_fbc = ironlake_disable_fbc;<br>
- } else if (IS_GM45(dev)) {<br>
- dev_priv->display.fbc_enabled = g4x_fbc_enabled;<br>
- dev_priv->display.enable_fbc = g4x_enable_fbc;<br>
- dev_priv->display.disable_fbc = g4x_disable_fbc;<br>
- } else {<br>
- dev_priv->display.fbc_enabled = i8xx_fbc_enabled;<br>
- dev_priv->display.enable_fbc = i8xx_enable_fbc;<br>
- dev_priv->display.disable_fbc = i8xx_disable_fbc;<br>
-<br>
- /* This value was pulled out of someone's hat */<br>
- I915_WRITE(FBC_CONTROL, 500 << FBC_CTL_INTERVAL_SHIFT);<br>
- }<br>
- }<br>
+ intel_init_fbc(dev_priv);<br>
<br>
/* For cxsr */<br>
if (IS_PINEVIEW(dev))<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.0<br>
<br>
_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Rodrigo Vivi</div><div>Blog: <a href="http://blog.vivi.eng.br" target="_blank">http://blog.vivi.eng.br</a></div><div> </div>
</div>