public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Avoid reading fbc registers in vain when fbc was never enabled.
@ 2014-09-17 20:59 Rodrigo Vivi
  2014-09-18  6:28 ` Chris Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Rodrigo Vivi @ 2014-09-17 20:59 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni, Rodrigo Vivi

If it wasn't never enabled by kernel parameter or platform default
we can avoid reading registers so many times in vain

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index a988862..afcc284 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -339,6 +339,12 @@ bool intel_fbc_enabled(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
+	/* If it wasn't never enabled by kernel parameter or platform default
+	 * we can avoid reading registers so many times in vain
+	 */
+	if (!i915.enable_fbc)
+		return false;
+
 	if (!dev_priv->display.fbc_enabled)
 		return false;
 
-- 
1.9.3

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

end of thread, other threads:[~2014-09-19 18:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 20:59 [PATCH] drm/i915: Avoid reading fbc registers in vain when fbc was never enabled Rodrigo Vivi
2014-09-18  6:28 ` Chris Wilson
2014-09-18 11:39   ` Daniel Vetter
2014-09-18 18:42     ` Rodrigo Vivi
2014-09-18 22:37       ` Paulo Zanoni
2014-09-19 15:40       ` Daniel Vetter
2014-09-19 18:24         ` Rodrigo Vivi
2014-09-19 18:29           ` Paulo Zanoni

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