From patchwork Tue May 3 19:21:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 751162 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p43JPgK2004825 for ; Tue, 3 May 2011 19:26:02 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 610609F367 for ; Tue, 3 May 2011 12:25:42 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from oproxy2-pub.bluehost.com (oproxy2-pub.bluehost.com [67.222.39.60]) by gabe.freedesktop.org (Postfix) with SMTP id F155F9EF96 for ; Tue, 3 May 2011 12:21:35 -0700 (PDT) Received: (qmail 3604 invoked by uid 0); 3 May 2011 19:21:35 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by oproxy2.bluehost.com with SMTP; 3 May 2011 19:21:35 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=virtuousgeek.org; h=Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References:X-Identified-User; b=V4SxIy+RzO1SUZ0Cy9UoP4/wxUWGV/mgKHVZvbn6edPRupiJzokUNVfFwacOg41Pne0E+QkZYKAjTHmLxRe3+xkQuKwN00GD10wNyLLutu2W5k+dotfX7S4PwGSBAVpA; Received: from c-67-161-37-189.hsd1.ca.comcast.net ([67.161.37.189] helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1QHLA6-0002aQ-4Q; Tue, 03 May 2011 13:21:34 -0600 From: Jesse Barnes To: dri-devel@lists.freedesktop.org, xorg-devel@lists.freedesktop.org, mesa-dev@lists.freedesktop.org Subject: [PATCH 4/4] GLX/DRI2: make GLX swap event handling match spec Date: Tue, 3 May 2011 12:21:27 -0700 Message-Id: <1304450489-31415-5-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1304450489-31415-1-git-send-email-jbarnes@virtuousgeek.org> References: <1304450489-31415-1-git-send-email-jbarnes@virtuousgeek.org> X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 03 May 2011 19:26:03 +0000 (UTC) Only send a 32 bit swap count out to the client. Signed-off-by: Jesse Barnes --- configure.ac | 4 ++-- glx/glxdri2.c | 5 ++--- hw/xfree86/dri2/dri2.c | 2 +- hw/xfree86/dri2/dri2.h | 2 +- hw/xfree86/dri2/dri2ext.c | 5 ++--- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 6eb780c..87194a5 100644 --- a/configure.ac +++ b/configure.ac @@ -771,11 +771,11 @@ RECORDPROTO="recordproto >= 1.13.99.1" SCRNSAVERPROTO="scrnsaverproto >= 1.1" RESOURCEPROTO="resourceproto" DRIPROTO="xf86driproto >= 2.1.0" -DRI2PROTO="dri2proto >= 2.3" +DRI2PROTO="dri2proto >= 2.4" XINERAMAPROTO="xineramaproto" BIGFONTPROTO="xf86bigfontproto >= 1.2.0" DGAPROTO="xf86dgaproto >= 2.0.99.1" -GLPROTO="glproto >= 1.4.10" +GLPROTO="glproto >= 1.4.13" DMXPROTO="dmxproto >= 2.2.99.1" VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" WINDOWSWMPROTO="windowswmproto" diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 93c5e5b..450d8c9 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -163,7 +163,7 @@ __glXDRIdrawableWaitGL(__GLXdrawable *drawable) static void __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust, - CARD64 msc, CARD64 sbc) + CARD64 msc, CARD32 sbc) { __GLXdrawable *drawable = data; xGLXBufferSwapComplete wire; @@ -192,8 +192,7 @@ __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust, wire.ust_lo = ust & 0xffffffff; wire.msc_hi = msc >> 32; wire.msc_lo = msc & 0xffffffff; - wire.sbc_hi = sbc >> 32; - wire.sbc_lo = sbc & 0xffffffff; + wire.sbc = sbc; WriteEventsToClient(client, 1, (xEvent *) &wire); } diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 5c42a51..40829c2 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -76,7 +76,7 @@ typedef struct _DRI2Drawable { ClientPtr blockedClient; Bool blockedOnMsc; int swap_interval; - CARD64 swap_count; + CARD32 swap_count; int64_t target_sbc; /* -1 means no SBC wait outstanding */ CARD64 last_swap_target; /* most recently queued swap target */ CARD64 last_swap_msc; /* msc at completion of most recent swap */ diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h index fe0bf6c..2a41ead 100644 --- a/hw/xfree86/dri2/dri2.h +++ b/hw/xfree86/dri2/dri2.h @@ -51,7 +51,7 @@ extern CARD8 dri2_minor; typedef DRI2BufferRec DRI2Buffer2Rec, *DRI2Buffer2Ptr; typedef void (*DRI2SwapEventPtr)(ClientPtr client, void *data, int type, - CARD64 ust, CARD64 msc, CARD64 sbc); + CARD64 ust, CARD64 msc, CARD32 sbc); typedef DRI2BufferPtr (*DRI2CreateBuffersProcPtr)(DrawablePtr pDraw, diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c index 4e48e65..2bb515f 100644 --- a/hw/xfree86/dri2/dri2ext.c +++ b/hw/xfree86/dri2/dri2ext.c @@ -357,7 +357,7 @@ vals_to_card64(CARD32 lo, CARD32 hi) static void DRI2SwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc, - CARD64 sbc) + CARD32 sbc) { xDRI2BufferSwapComplete event; DrawablePtr pDrawable = data; @@ -369,8 +369,7 @@ DRI2SwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc, event.ust_lo = ust & 0xffffffff; event.msc_hi = (CARD64)msc >> 32; event.msc_lo = msc & 0xffffffff; - event.sbc_hi = (CARD64)sbc >> 32; - event.sbc_lo = sbc & 0xffffffff; + event.sbc = sbc; WriteEventsToClient(client, 1, (xEvent *)&event); }