[Intel-gfx] [PATCH] drm/i915: use a separate context for gpu relocs
Chris Wilson
chris at chris-wilson.co.uk
Sat Aug 24 09:03:58 UTC 2019
Quoting Daniele Ceraolo Spurio (2019-08-24 01:20:22)
> @@ -943,6 +945,7 @@ static void reloc_gpu_flush(struct reloc_cache *cache)
> static void reloc_cache_reset(struct reloc_cache *cache)
> {
> void *vaddr;
> + struct intel_context *ce;
>
> if (cache->rq)
> reloc_gpu_flush(cache);
> @@ -973,6 +976,10 @@ static void reloc_cache_reset(struct reloc_cache *cache)
> }
> }
>
> + ce = fetch_and_zero(&cache->ce);
> + if (ce)
> + intel_context_put(ce);
For peace of mind, this is too late. For pure gpu relocs, cache->vaddr is 0
and so we took the short-circuit at the beginning of the function.
-Chris
More information about the Intel-gfx
mailing list