diff options
author | Mario Kleiner <mario.kleiner@tuebingen.mpg.de> | 2010-12-09 03:12:35 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-16 11:42:43 +0000 |
commit | 2177e6032146f4720f244e98f7c0d6df1b925784 (patch) | |
tree | 5413bb44147007f9024e292ec44073219e22b94e /src/intel_dri.c | |
parent | 71af40a75fbdd1054b1111e8cbe67ad1f97e6613 (diff) |
Fix reporting of pageflip completion events on multi-head.
When a drawable is page-flipped on multiple crtc's (fullscreen
drawable on mirror-mode or multi-head x-screen), only one pageflip
event is finally delivered, after the last participating crtc signals
flip completion, this to avoid visual corruption.
Old code returned vblank count and timestamps of flip completion
of this last crtc, instead of the values of the "master crtc", the
one that was used for initially scheduling/triggering the pagflip
via vblank events. (master = I830DRI2DrawablePipe(drawable))
This patch makes sure that the pageflip completion values of the
"master" crtc are returned, otherwise client applications will
get confused by the random (msc, ust) values returned by whichever
crtc was the last to complete its flip. Without this, the returned
values change randomly and jump forward and backward in time and
count.
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_dri.c')
-rw-r--r-- | src/intel_dri.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c index 67f7be9d..e3835482 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -634,6 +634,9 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, I830DRI2BufferPrivatePtr back_priv; DRI2FrameEventPtr flip_info; + /* Main crtc for this drawable shall finally deliver pageflip event. */ + int ref_crtc_hw_id = I830DRI2DrawablePipe(draw); + flip_info = calloc(1, sizeof(DRI2FrameEventRec)); if (!flip_info) return FALSE; @@ -648,7 +651,7 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, back_priv = back->driverPrivate; return intel_do_pageflip(intel, intel_get_pixmap_bo(back_priv->pixmap), - flip_info); + flip_info, ref_crtc_hw_id); } static Bool |