diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 0f358c5999ec..e8d3da9f3373 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c | |||
@@ -503,18 +503,19 @@ static int execlists_context_queue(struct intel_engine_cs *ring, | |||
503 | * If there isn't a request associated with this submission, | 503 | * If there isn't a request associated with this submission, |
504 | * create one as a temporary holder. | 504 | * create one as a temporary holder. |
505 | */ | 505 | */ |
506 | WARN(1, "execlist context submission without request"); | ||
507 | request = kzalloc(sizeof(*request), GFP_KERNEL); | 506 | request = kzalloc(sizeof(*request), GFP_KERNEL); |
508 | if (request == NULL) | 507 | if (request == NULL) |
509 | return -ENOMEM; | 508 | return -ENOMEM; |
510 | request->ring = ring; | 509 | request->ring = ring; |
511 | request->ctx = to; | 510 | request->ctx = to; |
511 | kref_init(&request->ref); | ||
512 | request->uniq = dev_priv->request_uniq++; | ||
513 | i915_gem_context_reference(request->ctx); | ||
512 | } else { | 514 | } else { |
515 | i915_gem_request_reference(request); | ||
513 | WARN_ON(to != request->ctx); | 516 | WARN_ON(to != request->ctx); |
514 | } | 517 | } |
515 | request->tail = tail; | 518 | request->tail = tail; |
516 | i915_gem_request_reference(request); | ||
517 | i915_gem_context_reference(request->ctx); | ||
518 | 519 | ||
519 | intel_runtime_pm_get(dev_priv); | 520 | intel_runtime_pm_get(dev_priv); |
520 | 521 | ||
@@ -731,7 +732,6 @@ void intel_execlists_retire_requests(struct intel_engine_cs *ring) | |||
731 | if (ctx_obj && (ctx != ring->default_context)) | 732 | if (ctx_obj && (ctx != ring->default_context)) |
732 | intel_lr_context_unpin(ring, ctx); | 733 | intel_lr_context_unpin(ring, ctx); |
733 | intel_runtime_pm_put(dev_priv); | 734 | intel_runtime_pm_put(dev_priv); |
734 | i915_gem_context_unreference(ctx); | ||
735 | list_del(&req->execlist_link); | 735 | list_del(&req->execlist_link); |
736 | i915_gem_request_unreference(req); | 736 | i915_gem_request_unreference(req); |
737 | } | 737 | } |