xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Wed Nov 10 14:39:37 PST 2010


 hw/xfree86/dri2/dri2.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 383dfe23f1641435c0713f8a56424814a156af8e
Author: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
Date:   Mon Oct 25 17:13:57 2010 +0300

    DRI2: Avoid call to NULL pointer
    
    DDX driver may implement schedule swap without GetMSC. In that case we
    can't call GetMSC in DRI2SwapBuffers.
    
    Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
    Reviewed-by: Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
    CC: Keith Packard <keithp at keithp.com>
    CC: Kristian Høgsberg <krh at bitplanet.net>
    Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 34f735f..e4693d9 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -828,11 +828,14 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
 	 * is moved to a crtc with a lower refresh rate, or a crtc that just
 	 * got enabled.
 	 */
-	if (!(*ds->GetMSC)(pDraw, &ust, &current_msc))
-	    pPriv->last_swap_target = 0;
+	if (ds->GetMSC) {
+	    if (!(*ds->GetMSC)(pDraw, &ust, &current_msc))
+		pPriv->last_swap_target = 0;
 
-	if (current_msc < pPriv->last_swap_target)
-	    pPriv->last_swap_target = current_msc;
+	    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


More information about the xorg-commit mailing list