From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: Disallow preallocation of requests Date: Wed, 26 Sep 2012 13:41:55 +0100 Message-ID: <84c8a8$5sqvi4@orsmga001.jf.intel.com> References: <1348662933-13467-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 42E359E797 for ; Wed, 26 Sep 2012 05:42:03 -0700 (PDT) In-Reply-To: <1348662933-13467-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, 26 Sep 2012 13:35:33 +0100, Chris Wilson wrote: > The intention was to allow the caller to avoid a failure to queue a > request having already written commands to the ring. However, this is a > moot point as the i915_add_request() can fail for other reasons than a > mere allocation failure and those failure cases are more likely than > ENOMEM. So the overlay code already had to handle i915_add_request() > failures, and due to > > commit 3bb73aba1ed5198a2c1dfaac4f3c95459930d84a > Author: Chris Wilson > Date: Fri Jul 20 12:40:59 2012 +0100 > > drm/i915: Allow late allocation of request for i915_add_request() > > the error handling code in intel_overlay.c was subject to causing > double-frees. > > Rather than further complicate i915_add_request() and callers, realise > the battle is lost and adapt intel_overlay.c to take advantage of the > late allocation of requests. Ah crap. Compile tested, obviously not run. -Chris -- Chris Wilson, Intel Open Source Technology Centre