[Intel-gfx] [PATCH v2] drm/i915: Split obj->cache_coherent to track r/w

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 11 11:12:21 UTC 2017


Quoting Chris Wilson (2017-08-11 11:11:31)
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 5fa44767c29e..9d808838a1ba 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1842,7 +1842,13 @@ static int eb_move_to_gpu(struct i915_execbuffer *eb)
>                         eb->request->capture_list = capture;
>                 }
>  
> -               if (unlikely(obj->cache_dirty && !obj->cache_coherent)) {
> +               /*
> +                * If the GPU is not _reading_ through the CPU cache, we need
> +                * to make sure that any writes (both previous GPU writes from
> +                * before a change in snooping levels and normal CPU writes)
> +                * caught in that cache are flushed to main memory.
> +                */
> +               if (unlikely(obj->cache_coherent & obj->cache_dirty)) {

Failure in caffeination.
-Chris


More information about the Intel-gfx mailing list