aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorOscar Mateo <oscar.mateo@intel.com>2014-07-03 11:28:04 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-08 06:31:02 -0400
commit1b5d063fafeb01569ca988b1d4f45f64c67d2e5d (patch)
tree4c2812d2bd309da21d778c21e14e4614d9271c35 /drivers/gpu/drm
parent64c58f2c48da85223f0db438fe4854bc3ef24353 (diff)
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: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c4
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b6225730cdcd..e5d4d73a9844 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2330,7 +2330,7 @@ int __i915_add_request(struct intel_engine_cs *ring,
2330 u32 request_ring_position, request_start; 2330 u32 request_ring_position, request_start;
2331 int ret; 2331 int ret;
2332 2332
2333 request_start = intel_ring_get_tail(ring); 2333 request_start = intel_ring_get_tail(ring->buffer);
2334 /* 2334 /*
2335 * Emit any outstanding flushes - execbuf can fail to emit the flush 2335 * Emit any outstanding flushes - execbuf can fail to emit the flush
2336 * after having emitted the batchbuffer command. Hence we need to fix 2336 * 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 * GPU processing the request, we never over-estimate the 2351 * GPU processing the request, we never over-estimate the
2352 * position of the head. 2352 * position of the head.
2353 */ 2353 */
2354 request_ring_position = intel_ring_get_tail(ring); 2354 request_ring_position = intel_ring_get_tail(ring->buffer);
2355 2355
2356 ret = ring->add_request(ring); 2356 ret = ring->add_request(ring);
2357 if (ret) 2357 if (ret)
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index 17ef9cdf1b8d..ed5941078f92 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -386,9 +386,9 @@ int intel_init_vebox_ring_buffer(struct drm_device *dev);
386u64 intel_ring_get_active_head(struct intel_engine_cs *ring); 386u64 intel_ring_get_active_head(struct intel_engine_cs *ring);
387void intel_ring_setup_status_page(struct intel_engine_cs *ring); 387void intel_ring_setup_status_page(struct intel_engine_cs *ring);
388 388
389static inline u32 intel_ring_get_tail(struct intel_engine_cs *ring) 389static inline u32 intel_ring_get_tail(struct intel_ringbuffer *ringbuf)
390{ 390{
391 return ring->buffer->tail; 391 return ringbuf->tail;
392} 392}
393 393
394static inline u32 intel_ring_get_seqno(struct intel_engine_cs *ring) 394static inline u32 intel_ring_get_seqno(struct intel_engine_cs *ring)