From patchwork Fri Mar 26 21:25:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pauli Nieminen X-Patchwork-Id: 88583 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2QLPeBi031394 for ; Fri, 26 Mar 2010 21:26:15 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 940F09E760; Fri, 26 Mar 2010 14:25:39 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from filtteri6.pp.htv.fi (filtteri6.pp.htv.fi [213.243.153.189]) by gabe.freedesktop.org (Postfix) with ESMTP id 961BC9E748 for ; Fri, 26 Mar 2010 14:25:38 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by filtteri6.pp.htv.fi (Postfix) with ESMTP id 0F7BF56E107; Fri, 26 Mar 2010 23:25:37 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp5.welho.com ([213.243.153.39]) by localhost (filtteri6.pp.htv.fi [213.243.153.189]) (amavisd-new, port 10024) with ESMTP id n8+s2QcJVZK9; Fri, 26 Mar 2010 23:25:36 +0200 (EET) Received: from localhost.localdomain (cs181130083.pp.htv.fi [82.181.130.83]) by smtp5.welho.com (Postfix) with ESMTP id AC4FF5BC004; Fri, 26 Mar 2010 23:25:36 +0200 (EET) From: Pauli Nieminen To: intel-gfx@lists.freedesktop.org Date: Fri, 26 Mar 2010 23:25:29 +0200 Message-Id: <1269638729-10746-1-git-send-email-suokkos@gmail.com> X-Mailer: git-send-email 1.6.3.3 Subject: [Intel-gfx] [PATCH] DRI2: Fix cleanup if scheduling page flip failed. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 26 Mar 2010 21:26:15 +0000 (UTC) diff --git a/src/i830_dri.c b/src/i830_dri.c index 321faf6..3aff58c 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -469,7 +469,6 @@ I830DRI2ScheduleFlip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, { ScreenPtr screen = draw->pScreen; I830DRI2BufferPrivatePtr front_priv, back_priv; - dri_bo *tmp_bo; DRI2FrameEventPtr flip_info; Bool ret; @@ -485,7 +484,6 @@ I830DRI2ScheduleFlip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, front_priv = front->driverPrivate; back_priv = back->driverPrivate; - tmp_bo = i830_get_pixmap_bo(front_priv->pixmap); I830DRI2ExchangeBuffers(draw, front, back); @@ -497,9 +495,7 @@ I830DRI2ScheduleFlip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, /* Unwind in case of failure */ if (!ret) { - i830_set_pixmap_bo(back_priv->pixmap, - i830_get_pixmap_bo(front_priv->pixmap)); - i830_set_pixmap_bo(front_priv->pixmap, tmp_bo); + I830DRI2ExchangeBuffers(draw, front, back); return FALSE; }