aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2017-11-24 13:00:29 +0000
committerChris Wilson <[email protected]>2017-11-24 16:09:51 +0000
commit8c5da3bbcfd9cf763623f2d9515ace8eb3f01307 (patch)
tree2f677455b642e79944eb715086029bbb59b514e1
parentaa34a6fc2722f042e372741661c0fae8640245ac (diff)
drm/i915/guc: Tidy ELSP port assignment
Since we know that the port is empty, we do not need to extract the count from the old request it and copy it over to the new request, or attempt to unref the NULL old request pointer. Signed-off-by: Chris Wilson <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: Michał Winiarski <[email protected]> Reviewed-by: Michał Winiarski <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/i915/intel_guc_submission.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index 70e64bdb73dd..cf1cc2cb6722 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -718,12 +718,9 @@ static void guc_submit(struct intel_engine_cs *engine)
static void port_assign(struct execlist_port *port,
struct drm_i915_gem_request *rq)
{
- GEM_BUG_ON(rq == port_request(port));
-
- if (port_isset(port))
- i915_gem_request_put(port_request(port));
+ GEM_BUG_ON(port_isset(port));
- port_set(port, port_pack(i915_gem_request_get(rq), port_count(port)));
+ port_set(port, i915_gem_request_get(rq));
}
static void guc_dequeue(struct intel_engine_cs *engine)