[Intel-gfx] [PATCH 13/73] drm/i915: Move the modulus for ring emission to the register write

Chris Wilson chris at chris-wilson.co.uk
Mon Aug 1 16:23:39 UTC 2016


On Mon, Aug 01, 2016 at 05:17:51PM +0100, Chris Wilson wrote:
> Following that reasoning, if we just:
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 15acaf6..d54c210 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -2370,7 +2370,7 @@ int intel_ring_begin(struct drm_i915_gem_request *req, int num_dwords)
>  
>         total_bytes = bytes + req->reserved_space;
>  
> -       if (unlikely(bytes > remain_usable)) {
> +       if (unlikely(bytes >= remain_usable)) {
> 
> we can make this late modulus vanish.

Sorry, that idea is wrong at present - as we need to fixup the tail
afterwards.  It's not until later we talk about moving the tail
advancement into the equivalent of intel_ring_begin().
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list