diff options
author | John Harrison <John.C.Harrison@Intel.com> | 2015-05-29 12:43:29 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-06-23 08:02:00 -0400 |
commit | 217e46b576ef0d5eed10ddfeb2b29bd3de289e95 (patch) | |
tree | 9aa777ed8ce9af4794c919244fa046cc261ade25 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | adeca76d8e2b34b5c739a36f4191aed63080da40 (diff) |
drm/i915: Update alloc_request to return the allocated request
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.
v2: Updated for new i915_gem_request_alloc() scheme.
For: VIZ-5115
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Tomas Elf <tomas.elf@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index b48aea12acc4..13eab1757972 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -2277,6 +2277,7 @@ static int __intel_ring_prepare(struct intel_engine_cs *ring, int bytes) | |||
2277 | int intel_ring_begin(struct intel_engine_cs *ring, | 2277 | int intel_ring_begin(struct intel_engine_cs *ring, |
2278 | int num_dwords) | 2278 | int num_dwords) |
2279 | { | 2279 | { |
2280 | struct drm_i915_gem_request *req; | ||
2280 | struct drm_i915_private *dev_priv = ring->dev->dev_private; | 2281 | struct drm_i915_private *dev_priv = ring->dev->dev_private; |
2281 | int ret; | 2282 | int ret; |
2282 | 2283 | ||
@@ -2290,7 +2291,7 @@ int intel_ring_begin(struct intel_engine_cs *ring, | |||
2290 | return ret; | 2291 | return ret; |
2291 | 2292 | ||
2292 | /* Preallocate the olr before touching the ring */ | 2293 | /* Preallocate the olr before touching the ring */ |
2293 | ret = i915_gem_request_alloc(ring, ring->default_context); | 2294 | ret = i915_gem_request_alloc(ring, ring->default_context, &req); |
2294 | if (ret) | 2295 | if (ret) |
2295 | return ret; | 2296 | return ret; |
2296 | 2297 | ||