diff mbox

[4/6] drm/i915: Disable FBC across page-flipping

Message ID 1310039291-22554-5-git-send-email-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson July 7, 2011, 11:48 a.m. UTC
Page-flipping updates the scanout address, nukes the FBC compressed
image and so forces an FBC update so that the displayed image remains
consistent. However, page-flipping does not update the FBC registers
themselves, which remain pointing to both the old address and the old
CPU fence. Future updates to the new front-buffer (scanout) are then

This first approach to demonstrate the issue and highlight the fix,
simply disables FBC upon page-flip (a recompression will be forced on
every flip so FBC becomes immaterial) and then re-enables FBC in the
page-flip finish work function, so that the FBC registers are now
pointing to the new framebuffer and front-buffer rendering works once

Ideally, we want to only re-enable FBC after page-flipping is complete,
as otherwise we are just wasting cycles (along with an undesirable
wait-for-vblank which will halve the frame-rate of vsync'ed games) and
power (with needless recompression) whilst the page-flipping application
is still running.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33487
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
 drivers/gpu/drm/i915/intel_display.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox


diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 8ff0eae..ea085ff 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6131,6 +6131,7 @@  static void intel_unpin_work_fn(struct work_struct *__work)
+	intel_update_fbc(work->dev);
@@ -6495,6 +6496,7 @@  static int intel_crtc_page_flip(struct drm_crtc *crtc,
 	if (ret)
 		goto cleanup_pending;
+	intel_disable_fbc(dev);
 	trace_i915_flip_request(intel_crtc->plane, obj);