[Intel-gfx] [PATCH 1/6] drm/i915: make sure we're not changing the FBC CFB with FBC enabled

Paulo Zanoni przanoni at gmail.com
Wed Jul 8 13:58:54 PDT 2015


From: Paulo Zanoni <paulo.r.zanoni at intel.com>

We used to have this bug in the past, but now that we properly track
the size of the CFB, we don't have it anymore. Still, add the WARN
just to make sure we don't go back to the bad state.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
 drivers/gpu/drm/i915/intel_fbc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index c271af7..1448746 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -589,6 +589,8 @@ static int intel_fbc_alloc_cfb(struct drm_i915_private *dev_priv, int size,
 
 	dev_priv->fbc.threshold = ret;
 
+	WARN_ON(dev_priv->fbc.enabled);
+
 	if (INTEL_INFO(dev_priv)->gen >= 5)
 		I915_WRITE(ILK_DPFC_CB_BASE, dev_priv->fbc.compressed_fb.start);
 	else if (IS_GM45(dev_priv)) {
-- 
2.1.4



More information about the Intel-gfx mailing list