[Intel-gfx] [PATCH] drm/i915: Disallow preallocation of requests

Chris Wilson chris at chris-wilson.co.uk
Wed Sep 26 14:41:55 CEST 2012


On Wed, 26 Sep 2012 13:35:33 +0100, Chris Wilson <chris at chris-wilson.co.uk> 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 <chris at chris-wilson.co.uk>
> 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



More information about the Intel-gfx mailing list