diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-08 07:22:41 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-07-08 13:23:15 -0400 |
commit | 7782de3bd671657674e7baba854f0fd43e9f86bc (patch) | |
tree | 9969ffe609a8115ae571f1dbfbc4077be4089bdd /drivers/gpu/drm/i915/intel_display.c | |
parent | 9ce9d0695d15da23ffe817516ba5d0b58caf8d05 (diff) |
drm/i915: Disable FBC across page-flipping
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
undetected!
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
more.
Ideally, we want to only re-enable FBC after page-flipping is complete,
as otherwise we are just wasting cycles 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>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9df96bdc002e..f0788a97801e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -6333,6 +6333,7 @@ static void intel_unpin_work_fn(struct work_struct *__work) | |||
6333 | drm_gem_object_unreference(&work->pending_flip_obj->base); | 6333 | drm_gem_object_unreference(&work->pending_flip_obj->base); |
6334 | drm_gem_object_unreference(&work->old_fb_obj->base); | 6334 | drm_gem_object_unreference(&work->old_fb_obj->base); |
6335 | 6335 | ||
6336 | intel_update_fbc(work->dev); | ||
6336 | mutex_unlock(&work->dev->struct_mutex); | 6337 | mutex_unlock(&work->dev->struct_mutex); |
6337 | kfree(work); | 6338 | kfree(work); |
6338 | } | 6339 | } |
@@ -6697,6 +6698,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, | |||
6697 | if (ret) | 6698 | if (ret) |
6698 | goto cleanup_pending; | 6699 | goto cleanup_pending; |
6699 | 6700 | ||
6701 | intel_disable_fbc(dev); | ||
6700 | mutex_unlock(&dev->struct_mutex); | 6702 | mutex_unlock(&dev->struct_mutex); |
6701 | 6703 | ||
6702 | trace_i915_flip_request(intel_crtc->plane, obj); | 6704 | trace_i915_flip_request(intel_crtc->plane, obj); |