提交 ff79e857 编写于 作者: J John Harrison 提交者: Daniel Vetter

drm/i915: Connect requests to rings at creation not submission

It makes a lot more sense (and makes future seqno -> request conversion patches
simpler) to fill in the 'ring' field of the request structure at the point of
creation rather than submission. Given that the request structure is assigned by
ring specific code and thus is locked to a ring from the start, there really is
no reason to defer this assignment.

For: VIZ-4377
Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
Reviewed-by: NThomas Daniel <Thomas.Daniel@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 44cdd6d2
...@@ -2463,7 +2463,6 @@ int __i915_add_request(struct intel_engine_cs *ring, ...@@ -2463,7 +2463,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
return ret; return ret;
} }
request->ring = ring;
request->head = request_start; request->head = request_start;
request->tail = request_ring_position; request->tail = request_ring_position;
......
...@@ -898,6 +898,7 @@ static int logical_ring_alloc_request(struct intel_engine_cs *ring, ...@@ -898,6 +898,7 @@ static int logical_ring_alloc_request(struct intel_engine_cs *ring,
} }
kref_init(&request->ref); kref_init(&request->ref);
request->ring = ring;
ret = i915_gem_get_seqno(ring->dev, &request->seqno); ret = i915_gem_get_seqno(ring->dev, &request->seqno);
if (ret) { if (ret) {
......
...@@ -2044,6 +2044,7 @@ intel_ring_alloc_request(struct intel_engine_cs *ring) ...@@ -2044,6 +2044,7 @@ intel_ring_alloc_request(struct intel_engine_cs *ring)
return -ENOMEM; return -ENOMEM;
kref_init(&request->ref); kref_init(&request->ref);
request->ring = ring;
ret = i915_gem_get_seqno(ring->dev, &request->seqno); ret = i915_gem_get_seqno(ring->dev, &request->seqno);
if (ret) { if (ret) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册