xf86-video-intel: 2 commits - src/sna/sna_display.c src/sna/sna_dri2.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Feb 23 14:41:54 UTC 2016


 src/sna/sna_display.c |    3 +++
 src/sna/sna_dri2.c    |    7 ++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 4cd43faa646e368624079b73b216f6546ede5c16
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Feb 23 14:40:39 2016 +0000

    sna: Flush the DRM event queue after a modeset
    
    Changing the mode will cause the DRM events(pageflips, vblanks) to
    be completed and the queue flushed. After applying the CRTC, drain the
    event queue.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 4870429..98fb8af 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6988,6 +6988,9 @@ sna_crtc_config_notify(ScreenPtr screen)
 		return;
 	}
 
+	/* Flush any events completed by the modeset */
+	sna_mode_wakeup(sna);
+
 	update_flush_interval(sna);
 	sna->cursor.disable = false; /* Reset HW cursor until the next fail */
 	sna_cursors_reload(sna);
commit 3593a2d18928f74ee470f824dc34b8b5b148ce2d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Feb 23 14:36:10 2016 +0000

    sna/dri2: Reset front pointer on frame event across a modeset
    
    If the root window's pixmap is changed (e.g. to resizing the
    framebuffer) then an outstanding flip becomes invalid. The invalid flip
    is marked as having a stale front, and that triggers an assertion if the
    user then tries to schedule flip before the pending flip event is
    processed.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=9425
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 9398c0a..2fcda87 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -3075,8 +3075,11 @@ sna_dri2_schedule_flip(ClientPtr client, DrawablePtr draw, xf86CrtcPtr crtc,
 
 		if (info && info->draw == draw) {
 			assert(info->type != FLIP);
-			assert(info->front == front);
 			assert(info->queued);
+			if (info->front != front) {
+				assert(info->front == NULL);
+				info->front = sna_dri2_reference_buffer(front);
+			}
 			if (info->back != back) {
 				_sna_dri2_destroy_buffer(sna, draw, info->back);
 				info->back = sna_dri2_reference_buffer(back);
@@ -3129,6 +3132,7 @@ sna_dri2_schedule_flip(ClientPtr client, DrawablePtr draw, xf86CrtcPtr crtc,
 			info->type = use_triple_buffer(sna, client, *target_msc == 0);
 			if (!sna_dri2_flip(info)) {
 				DBG(("%s: flip failed, falling back\n", __FUNCTION__));
+				info->signal = false;
 				sna_dri2_event_free(info);
 				return false;
 			}
@@ -3179,6 +3183,7 @@ queue:
 		/* Account for 1 frame extra pageflip delay */
 		if (!sna_wait_vblank(info,
 				     draw_target_seq(draw, *target_msc - 1))) {
+			info->signal = false;
 			sna_dri2_event_free(info);
 			return false;
 		}


More information about the xorg-commit mailing list