Message ID | 1445964628-30226-5-git-send-email-paulo.r.zanoni@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index ac87136..7d8e996 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -1091,12 +1091,10 @@ void intel_fbc_flush(struct drm_i915_private *dev_priv, dev_priv->fbc.busy_bits &= ~frontbuffer_bits; if (!dev_priv->fbc.busy_bits) { - if (origin == ORIGIN_FLIP) { - __intel_fbc_update(dev_priv); - } else { - __intel_fbc_disable(dev_priv); + if (dev_priv->fbc.enabled) + intel_fbc_recompress(dev_priv); + else __intel_fbc_update(dev_priv); - } } mutex_unlock(&dev_priv->fbc.lock);
There's no need to stop and restart FBC: a nuke should be fine. The specific check for ORIGIN_FLIP is not needed anymore since we have an early return for the ORIGIN_FLIP && dev_priv->fbc.enabled case. v2: Make it simpler (Chris). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> --- drivers/gpu/drm/i915/intel_fbc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)