• Chris Wilson's avatar
    drm/i915: Disable FBC across page-flipping · 7782de3b
    Chris Wilson authored
    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=33487Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    7782de3b
intel_display.c 226 KB