Re: [PATCH 08/51] drm/i915: Update alloc_request to return the allocated request

Daniel Vetter
2015-02-25T21:06:39Z

On Fri, Feb 13, 2015 at 12:21:29PM +0000, Chris Wilson wrote:
> On Fri, Feb 13, 2015 at 11:48:17AM +0000, John.C.Harrison@Intel.com wrote:
> > From: John Harrison <John.C.Harrison@Intel.com>
> >
> > The alloc_request() function does not actually return the newly allocated
> > request. Instead, it must be pulled from ring->outstanding_lazy_request. This
> > patch fixes this so that code can create a request and start using it knowing
> > exactly which request it actually owns.
>
> Why do we have different functions in the first place?

There seems to be a bit a layer fumble going on with the lrc alloc request
also pinning the lrc context. We could pull that out and then share the
function again since there's indeed no reason no to. At least afaics.

Also we should probably assign the ctx (if there is any) right in the
request alloc function so that these two bits are always tied together.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch