[Intel-gfx] [PATCH] drm/i915: Reduce engine->emit_flush() to a single mode parameter

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Jul 28 07:11:43 UTC 2016


On ke, 2016-07-27 at 11:53 +0100, Chris Wilson wrote:
> @@ -1713,9 +1711,7 @@ static int gen7_mm_switch(struct i915_hw_ppgtt *ppgtt,
>  
>  	/* XXX: RCS is the only one to auto invalidate the TLBs? */
>  	if (engine->id != RCS) {
> -		ret = engine->emit_flush(req,
> -					 I915_GEM_GPU_DOMAINS,
> -					 I915_GEM_GPU_DOMAINS);
> +		ret = engine->emit_flush(req, EMIT_INVALIDATE | EMIT_FLUSH);

Not quite sure why you want to use a combination of flags vs. _BARRIER
at different places?

But the code is now much more readable,

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list