| From 53262b34418eb392d8f4567a150fccfd6fc7acdd Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?St=C3=A9phane=20Marchesin?= <marcheu@chromium.org> |
| Date: Wed, 6 Mar 2013 19:00:38 -0800 |
| Subject: [PATCH 2/2] xf86-video-intel: Avoid display corruption when unable to |
| flip. |
| |
| This replaces the previous patch to xorg-server for crosbug/33775. |
| That change avoids calling ScheduleSwap when a flip would not be |
| classically possible, so interferes with the upcoming per-crtc |
| flip feature. |
| |
| BUG=chromium-os:35796 |
| TEST=Rapidly minimize/restore/tile window so that the animation spans |
| monitors, observe that none of the preview shadow is left behind. |
| --- |
| src/uxa/intel_dri.c | 7 +++++++ |
| 1 file changed, 7 insertions(+) |
| |
| diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c |
| index a627bb6..3f642e6 100644 |
| --- a/src/uxa/intel_dri.c |
| +++ b/src/uxa/intel_dri.c |
| @@ -1346,6 +1346,13 @@ I830DRI2ScheduleSwap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, |
| goto blit_fallback; |
| swap_type = DRI2_FLIP_SPLIT; |
| flip = 1; |
| + } else { |
| + /* Using the DRI2_SWAP path defers the back-to-front blit until |
| + * the frame event handler. If another swap comes in before that |
| + * event executes, our two-frame damage tracking will copy from |
| + * the unfinished frame and cause corruption. To avoid this |
| + * problem we force an immediate blit here. */ |
| + goto blit_fallback; |
| } |
| |
| swap_info->type = swap_type; |
| -- |
| 1.8.5.3 |
| |