diff options
author | marha <marha@users.sourceforge.net> | 2010-06-19 12:24:02 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-06-19 12:24:02 +0000 |
commit | 63b723ce3a0a5126c801569bd194d00141922262 (patch) | |
tree | ab2bda53c577bf2bf5bfb72b6d9705752d33bd83 /xorg-server/hw | |
parent | c33be01f08e4ea06dd618cf1c3d5a55dbab24dd1 (diff) | |
parent | 481fca2e77a44d0f0cd56c2732645726eec9dc6f (diff) | |
download | vcxsrv-63b723ce3a0a5126c801569bd194d00141922262.tar.gz vcxsrv-63b723ce3a0a5126c801569bd194d00141922262.tar.bz2 vcxsrv-63b723ce3a0a5126c801569bd194d00141922262.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Helper.c | 7 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dri2/dri2.c | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c index a88a1e758..c84f4a0ab 100644 --- a/xorg-server/hw/xfree86/common/xf86Helper.c +++ b/xorg-server/hw/xfree86/common/xf86Helper.c @@ -1441,6 +1441,13 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist) *sectlist = NULL;
/*
+ * This can happen when running Xorg -showopts and a module like ati
+ * or vmware tries to load its submodules when xf86ConfigLayout is empty
+ */
+ if (!xf86ConfigLayout.screens)
+ return 0;
+
+ /*
* This is a very important function that matches the device sections
* as they show up in the config file with the drivers that the server
* loads at run time.
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c index 123bc3225..fbed587c2 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.c +++ b/xorg-server/hw/xfree86/dri2/dri2.c @@ -759,6 +759,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, DRI2DrawablePtr pPriv;
DRI2BufferPtr pDestBuffer = NULL, pSrcBuffer = NULL;
int ret, i;
+ CARD64 ust, current_msc;
pPriv = DRI2GetDrawable(pDraw);
if (pPriv == NULL) {
@@ -803,12 +804,26 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, * need to schedule a swap for the last swap target + the swap interval.
*/
if (target_msc == 0 && divisor == 0 && remainder == 0) {
+ /* If the current vblank count of the drawable's crtc is lower
+ * than the count stored in last_swap_target from a previous swap
+ * then reinitialize last_swap_target to the current crtc's msc,
+ * otherwise the swap will hang. This will happen if the drawable
+ * is moved to a crtc with a lower refresh rate, or a crtc that just
+ * got enabled.
+ */
+ if (!(*ds->GetMSC)(pDraw, &ust, ¤t_msc))
+ pPriv->last_swap_target = 0;
+
+ if (current_msc < pPriv->last_swap_target)
+ pPriv->last_swap_target = current_msc;
+
/*
* Swap target for this swap is last swap target + swap interval since
* we have to account for the current swap count, interval, and the
* number of pending swaps.
*/
*swap_target = pPriv->last_swap_target + pPriv->swap_interval;
+
} else {
/* glXSwapBuffersMscOML could have a 0 target_msc, honor it */
*swap_target = target_msc;
|