diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-20 07:40:59 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-07-25 12:23:51 -0400 |
commit | 3bb73aba1ed5198a2c1dfaac4f3c95459930d84a (patch) | |
tree | cda853891463b2df4e440775a7faf415a143395c /drivers/gpu/drm/i915/i915_drv.h | |
parent | 540a8950047579a368a9b8fdcc15ab7fdb9921d3 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 2c0d8403c5ed..1f5f5ff6f897 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -1358,9 +1358,9 @@ void i915_gem_init_ppgtt(struct drm_device *dev); | |||
1358 | void i915_gem_cleanup_ringbuffer(struct drm_device *dev); | 1358 | void i915_gem_cleanup_ringbuffer(struct drm_device *dev); |
1359 | int __must_check i915_gpu_idle(struct drm_device *dev); | 1359 | int __must_check i915_gpu_idle(struct drm_device *dev); |
1360 | int __must_check i915_gem_idle(struct drm_device *dev); | 1360 | int __must_check i915_gem_idle(struct drm_device *dev); |
1361 | int __must_check i915_add_request(struct intel_ring_buffer *ring, | 1361 | int i915_add_request(struct intel_ring_buffer *ring, |
1362 | struct drm_file *file, | 1362 | struct drm_file *file, |
1363 | struct drm_i915_gem_request *request); | 1363 | struct drm_i915_gem_request *request); |
1364 | int __must_check i915_wait_seqno(struct intel_ring_buffer *ring, | 1364 | int __must_check i915_wait_seqno(struct intel_ring_buffer *ring, |
1365 | uint32_t seqno); | 1365 | uint32_t seqno); |
1366 | int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); | 1366 | int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); |