浏览代码

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 <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171124130031.20761-1-chris@chris-wilson.co.uk
Chris Wilson 7 年之前
父节点
当前提交
8c5da3bbcf
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      drivers/gpu/drm/i915/intel_guc_submission.c

+ 2 - 5
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,
 static void port_assign(struct execlist_port *port,
 			struct drm_i915_gem_request *rq)
 			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)
 static void guc_dequeue(struct intel_engine_cs *engine)