[Intel-gfx] [PATCH 7/8] drm/i915: Generalize intel_ring_get_tail to take a ringbuf
Jesse Barnes
jbarnes at virtuousgeek.org
Mon Jun 30 22:59:01 CEST 2014
On Thu, 26 Jun 2014 14:24:18 +0100
oscar.mateo at intel.com wrote:
> From: Oscar Mateo <oscar.mateo at intel.com>
>
> Again, it's low-level enough to simply take a ringbuf and nothing
> else.
>
> Trivial change.
>
> Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 4 ++--
> drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++--
> 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 f6d1238..ac7d50a 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,
> u32 request_ring_position, request_start;
> 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
> * after having emitted the batchbuffer command. Hence we need to fix
> @@ -2351,7 +2351,7 @@ int __i915_add_request(struct intel_engine_cs *ring,
> * GPU processing the request, we never over-estimate the
> * 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);
> if (ret)
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
> index e72017b..070568b 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> @@ -318,9 +318,9 @@ int intel_init_vebox_ring_buffer(struct drm_device *dev);
> u64 intel_ring_get_active_head(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)
Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list