[Intel-gfx] [PATCH 3/7] drm/i915: Assign request ringbuf before pin
Mika Kuoppala
mika.kuoppala at linux.intel.com
Fri Jul 3 07:09:34 PDT 2015
In preparation to make intel_lr_context_pin|unpin to accept
requests, assign ringbuf into request before we call the pinning.
Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
---
drivers/gpu/drm/i915/intel_lrc.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 4139eb6..ab8a98c 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -633,14 +633,16 @@ int intel_logical_ring_alloc_request_extras(struct drm_i915_gem_request *request
{
int ret;
+ request->ringbuf = request->ctx->engine[request->ring->id].ringbuf;
+
if (request->ctx != request->ring->default_context) {
ret = intel_lr_context_pin(request->ring, request->ctx);
- if (ret)
+ if (ret) {
+ request->ringbuf = NULL;
return ret;
+ }
}
- request->ringbuf = request->ctx->engine[request->ring->id].ringbuf;
-
return 0;
}
--
2.1.4
More information about the Intel-gfx
mailing list