drm/i915/lrc: Update function names to match request flow
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 2 Aug 2016 21:50:32 +0000 (22:50 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 2 Aug 2016 21:58:27 +0000 (22:58 +0100)
With adding engine->submit_request, we now have a bunch of functions
with similar names used at different stages of the execlist submission.
Try a different coat of paint, to hopefully reduce confusion between the
requests, intel_engine_cs and the actual execlists submision process.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-24-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-15-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_guc_submission.c
drivers/gpu/drm/i915/intel_lrc.c

index 5de8675852754a6768b81ea391bea3d1a3316496..c9105f68cc4e3d7a475affccd40e48f1359766d2 100644 (file)
@@ -1019,11 +1019,11 @@ void i915_guc_submission_disable(struct drm_i915_private *dev_priv)
        if (!guc->execbuf_client)
                return;
 
-       guc_client_free(dev_priv, guc->execbuf_client);
-       guc->execbuf_client = NULL;
-
        /* Revert back to manual ELSP submission */
        intel_execlists_enable_submission(dev_priv);
+
+       guc_client_free(dev_priv, guc->execbuf_client);
+       guc->execbuf_client = NULL;
 }
 
 void i915_guc_submission_fini(struct drm_i915_private *dev_priv)
index 524c195765c05128de4967dc34e20c1a75321e79..e8f855bc95d04ceddde22c6c27810002c7c3a4f3 100644 (file)
@@ -384,8 +384,8 @@ static void execlists_update_context(struct drm_i915_gem_request *rq)
                execlists_update_context_pdps(ppgtt, reg_state);
 }
 
-static void execlists_submit_requests(struct drm_i915_gem_request *rq0,
-                                     struct drm_i915_gem_request *rq1)
+static void execlists_elsp_submit_contexts(struct drm_i915_gem_request *rq0,
+                                          struct drm_i915_gem_request *rq1)
 {
        struct drm_i915_private *dev_priv = rq0->i915;
        unsigned int fw_domains = rq0->engine->fw_domains;
@@ -418,7 +418,7 @@ static inline void execlists_context_status_change(
        atomic_notifier_call_chain(&rq->ctx->status_notifier, status, rq);
 }
 
-static void execlists_context_unqueue(struct intel_engine_cs *engine)
+static void execlists_unqueue(struct intel_engine_cs *engine)
 {
        struct drm_i915_gem_request *req0 = NULL, *req1 = NULL;
        struct drm_i915_gem_request *cursor, *tmp;
@@ -486,7 +486,7 @@ static void execlists_context_unqueue(struct intel_engine_cs *engine)
                req0->tail &= req0->ring->size - 1;
        }
 
-       execlists_submit_requests(req0, req1);
+       execlists_elsp_submit_contexts(req0, req1);
 }
 
 static unsigned int
@@ -597,7 +597,7 @@ static void intel_lrc_irq_handler(unsigned long data)
        if (submit_contexts) {
                if (!engine->disable_lite_restore_wa ||
                    (csb[i][0] & GEN8_CTX_STATUS_ACTIVE_IDLE))
-                       execlists_context_unqueue(engine);
+                       execlists_unqueue(engine);
        }
 
        spin_unlock(&engine->execlist_lock);
@@ -606,7 +606,7 @@ static void intel_lrc_irq_handler(unsigned long data)
                DRM_ERROR("More than two context complete events?\n");
 }
 
-static void execlists_context_queue(struct drm_i915_gem_request *request)
+static void execlists_submit_request(struct drm_i915_gem_request *request)
 {
        struct intel_engine_cs *engine = request->engine;
        struct drm_i915_gem_request *cursor;
@@ -637,7 +637,7 @@ static void execlists_context_queue(struct drm_i915_gem_request *request)
        list_add_tail(&request->execlist_link, &engine->execlist_queue);
        request->ctx_hw_id = request->ctx->hw_id;
        if (num_elements == 0)
-               execlists_context_unqueue(engine);
+               execlists_unqueue(engine);
 
        spin_unlock_bh(&engine->execlist_lock);
 }
@@ -1899,7 +1899,7 @@ void intel_execlists_enable_submission(struct drm_i915_private *dev_priv)
        struct intel_engine_cs *engine;
 
        for_each_engine(engine, dev_priv)
-               engine->submit_request = execlists_context_queue;
+               engine->submit_request = execlists_submit_request;
 }
 
 static void
@@ -1909,7 +1909,7 @@ logical_ring_default_vfuncs(struct intel_engine_cs *engine)
        engine->init_hw = gen8_init_common_ring;
        engine->emit_flush = gen8_emit_flush;
        engine->emit_request = gen8_emit_request;
-       engine->submit_request = execlists_context_queue;
+       engine->submit_request = execlists_submit_request;
 
        engine->irq_enable = gen8_logical_ring_enable_irq;
        engine->irq_disable = gen8_logical_ring_disable_irq;