]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Allow late allocation of request for i915_add_request()
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 20 Jul 2012 11:40:59 +0000 (12:40 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 25 Jul 2012 16:23:51 +0000 (18:23 +0200)
commitbdc60ffa44eef96895b4817d265b8f7c3e01e6e7
treecda853891463b2df4e440775a7faf415a143395c
parenta4a4d66cc9a45c51dab2d01de98f70abf4021e5d
drm/i915: Allow late allocation of request for i915_add_request()

Request preallocation was added to i915_add_request() in order to
support the overlay. However, not all users care and can quite happily
ignore the failure to allocate the request as they will simply repeat
the request in the future.

By pushing the allocation down into i915_add_request(), we can then
remove some rather ugly error handling in the callers.

v2: Nullify request->file_priv otherwise we chase a garbage pointer
when retiring requests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c