From patchwork Thu Mar 24 18:09:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Packard X-Patchwork-Id: 659701 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 p2OI9x9x028769 for ; Thu, 24 Mar 2011 18:10:20 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 783799EF6A for ; Thu, 24 Mar 2011 11:09:59 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id E17369E7C8 for ; Thu, 24 Mar 2011 11:09:39 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 9333F760118; Thu, 24 Mar 2011 11:09:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cJKOrm1yPA-9; Thu, 24 Mar 2011 11:09:36 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1033) id B4838760119; Thu, 24 Mar 2011 11:09:36 -0700 (PDT) Received: from koto.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id B3086760118; Thu, 24 Mar 2011 11:09:36 -0700 (PDT) Received: by koto.keithp.com (Postfix, from userid 1488) id 5C52A1280FD; Thu, 24 Mar 2011 11:09:36 -0700 (PDT) From: Keith Packard To: Julien Cristau , Keith Packard In-Reply-To: <20110324010256.GX3159@radis.liafa.jussieu.fr> References: <20110324002457.C7976F80E7@kemper.freedesktop.org> <20110324010256.GX3159@radis.liafa.jussieu.fr> User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Thu, 24 Mar 2011 11:09:36 -0700 Message-ID: MIME-Version: 1.0 Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] xf86-video-intel: 3 commits - src/intel_display.c src/intel_dri.c src/intel.h 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: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=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]); Thu, 24 Mar 2011 18:10:20 +0000 (UTC) diff --git a/src/intel_dri.c b/src/intel_dri.c index 3b80823..f7a4fc4 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -625,8 +625,10 @@ i830_dri2_add_frame_event(DRI2FrameEventPtr frame_event) if (!AddResource(frame_event->client_id, frame_event_client_type, frame_event)) return FALSE; - if (!AddResource(frame_event->drawable_id, frame_event_drawable_type, frame_event)) + if (!AddResource(frame_event->drawable_id, frame_event_drawable_type, frame_event)) { + FreeResourceByType(frame_event->client_id, frame_event_client_type, TRUE); return FALSE; + } return TRUE; } @@ -705,7 +707,10 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, flip_info->event_data = data; flip_info->frame = target_msc; - i830_dri2_add_frame_event(flip_info); + if (!i830_dri2_add_frame_event(flip_info)) { + free(flip_info); + return FALSE; + } /* Page flip the full screen buffer */ back_priv = back->driverPrivate; @@ -958,7 +963,10 @@ I830DRI2ScheduleSwap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, I830DRI2ReferenceBuffer(front); I830DRI2ReferenceBuffer(back); - i830_dri2_add_frame_event(swap_info); + if (!i830_dri2_add_frame_event(swap_info)) { + free(swap_info); + goto blit_fallback; + } /* Get current count */ vbl.request.type = DRM_VBLANK_RELATIVE;