提交 1b5d063f 编写于 作者: O Oscar Mateo 提交者: Daniel Vetter

drm/i915: Generalize intel_ring_get_tail to take a ringbuf

Again, it's low-level enough to simply take a ringbuf and nothing
else.

Trivial change.
Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 64c58f2c
...@@ -2330,7 +2330,7 @@ int __i915_add_request(struct intel_engine_cs *ring, ...@@ -2330,7 +2330,7 @@ int __i915_add_request(struct intel_engine_cs *ring,
u32 request_ring_position, request_start; u32 request_ring_position, request_start;
int ret; int ret;
request_start = intel_ring_get_tail(ring); request_start = intel_ring_get_tail(ring->buffer);
/* /*
* Emit any outstanding flushes - execbuf can fail to emit the flush * Emit any outstanding flushes - execbuf can fail to emit the flush
* after having emitted the batchbuffer command. Hence we need to fix * after having emitted the batchbuffer command. Hence we need to fix
...@@ -2351,7 +2351,7 @@ int __i915_add_request(struct intel_engine_cs *ring, ...@@ -2351,7 +2351,7 @@ int __i915_add_request(struct intel_engine_cs *ring,
* GPU processing the request, we never over-estimate the * GPU processing the request, we never over-estimate the
* position of the head. * position of the head.
*/ */
request_ring_position = intel_ring_get_tail(ring); request_ring_position = intel_ring_get_tail(ring->buffer);
ret = ring->add_request(ring); ret = ring->add_request(ring);
if (ret) if (ret)
......
...@@ -386,9 +386,9 @@ int intel_init_vebox_ring_buffer(struct drm_device *dev); ...@@ -386,9 +386,9 @@ int intel_init_vebox_ring_buffer(struct drm_device *dev);
u64 intel_ring_get_active_head(struct intel_engine_cs *ring); u64 intel_ring_get_active_head(struct intel_engine_cs *ring);
void intel_ring_setup_status_page(struct intel_engine_cs *ring); void intel_ring_setup_status_page(struct intel_engine_cs *ring);
static inline u32 intel_ring_get_tail(struct intel_engine_cs *ring) static inline u32 intel_ring_get_tail(struct intel_ringbuffer *ringbuf)
{ {
return ring->buffer->tail; return ringbuf->tail;
} }
static inline u32 intel_ring_get_seqno(struct intel_engine_cs *ring) static inline u32 intel_ring_get_seqno(struct intel_engine_cs *ring)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册