diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-05-17 17:26:30 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-05-18 04:35:17 -0400 |
commit | 4e0d64dba816adf18c17488d38ede67a3d0e9b40 (patch) | |
tree | 76243fca2f9e23ab2f127f6d5aa1fc636c83f0b5 /drivers/gpu/drm/i915/intel_guc_submission.c | |
parent | c8af5274c3cbacb0905a26bcdef85901216e1134 (diff) |
drm/i915: Move request->ctx aside
In the next patch, we want to store the intel_context pointer inside
i915_request, as it is frequently access via a convoluted dance when
submitting the request to hw. Having two context pointers inside
i915_request leads to confusion so first rename the existing
i915_gem_context pointer to i915_request.gem_context.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180517212633.24934-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc_submission.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_guc_submission.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c index 637e852888ec..a432a193f3c4 100644 --- a/drivers/gpu/drm/i915/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/intel_guc_submission.c | |||
@@ -513,8 +513,9 @@ static void guc_add_request(struct intel_guc *guc, struct i915_request *rq) | |||
513 | { | 513 | { |
514 | struct intel_guc_client *client = guc->execbuf_client; | 514 | struct intel_guc_client *client = guc->execbuf_client; |
515 | struct intel_engine_cs *engine = rq->engine; | 515 | struct intel_engine_cs *engine = rq->engine; |
516 | u32 ctx_desc = lower_32_bits(intel_lr_context_descriptor(rq->ctx, | 516 | u32 ctx_desc = |
517 | engine)); | 517 | lower_32_bits(intel_lr_context_descriptor(rq->gem_context, |
518 | engine)); | ||
518 | u32 ring_tail = intel_ring_set_tail(rq->ring, rq->tail) / sizeof(u64); | 519 | u32 ring_tail = intel_ring_set_tail(rq->ring, rq->tail) / sizeof(u64); |
519 | 520 | ||
520 | spin_lock(&client->wq_lock); | 521 | spin_lock(&client->wq_lock); |
@@ -725,7 +726,7 @@ static bool __guc_dequeue(struct intel_engine_cs *engine) | |||
725 | struct i915_request *rq, *rn; | 726 | struct i915_request *rq, *rn; |
726 | 727 | ||
727 | list_for_each_entry_safe(rq, rn, &p->requests, sched.link) { | 728 | list_for_each_entry_safe(rq, rn, &p->requests, sched.link) { |
728 | if (last && rq->ctx != last->ctx) { | 729 | if (last && rq->gem_context != last->gem_context) { |
729 | if (port == last_port) { | 730 | if (port == last_port) { |
730 | __list_del_many(&p->requests, | 731 | __list_del_many(&p->requests, |
731 | &rq->sched.link); | 732 | &rq->sched.link); |