drm/i915: Filter out no-op frontbuffer tracking flushes
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 18 Jun 2015 08:30:21 +0000 (10:30 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Jun 2015 22:22:35 +0000 (00:22 +0200)
Paulo noticed that the fbc frontbuffer tracking flush callback
occasionally gets a call without any bit set. This can happen when we
have to filter flush calls due to e.g. gpu rendering. Filter these
out.

Reported-by: Paulo Zanoni <przanoni@gmail.com>
Cc: Paulo Zanoni <przanoni@gmail.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/intel_frontbuffer.c

index 3b0ac73ede8f099f7040b6ac2df2fb8b05d7537f..6a70a51332e93500732bad3f1c9e5709e3b5c646 100644 (file)
@@ -175,6 +175,9 @@ void intel_frontbuffer_flush(struct drm_device *dev,
        frontbuffer_bits &= ~dev_priv->fb_tracking.busy_bits;
        mutex_unlock(&dev_priv->fb_tracking.lock);
 
+       if (!frontbuffer_bits)
+               return;
+
        intel_mark_fb_busy(dev, frontbuffer_bits);
 
        intel_edp_drrs_flush(dev, frontbuffer_bits);