Message ID | 1439588061-18064-2-git-send-email-paulo.r.zanoni@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Aug 14, 2015 at 06:34:06PM -0300, Paulo Zanoni wrote: > 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@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 1f97fb5..c97aba2 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); > + We should really check it already before we free the stolen memory (or maybe sprinkle it to both places?), and we should make sure FBC really got disabled, ie. at last one vblank must have occured since the enable bit was cleared. Since we lack the vblank workers, I think having this WARN before the stolen is freed, with a FIXME about the disable vs. vblank issue would be acceptable. > 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.4.6 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 1f97fb5..c97aba2 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)) {
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@intel.com> --- drivers/gpu/drm/i915/intel_fbc.c | 2 ++ 1 file changed, 2 insertions(+)