[Intel-gfx] [PATCH 10/22] drm/i915/selftests: add write-dword test for LMEM

Chris Wilson chris at chris-wilson.co.uk
Fri Sep 27 19:27:12 UTC 2019


Quoting Matthew Auld (2019-09-27 18:33:57)
> +static int igt_gpu_write_dw(struct intel_context *ce,
> +                           struct i915_vma *vma,
> +                           u32 dword,
> +                           u32 value)
> +{
> +       int err;
> +
> +       i915_gem_object_lock(vma->obj);
> +       err = i915_gem_object_set_to_gtt_domain(vma->obj, true);
> +       i915_gem_object_unlock(vma->obj);
> +       if (err)
> +               return err;

Your cpu check doesn't leave the caches dirty so this is overkill, and
worse may hide a coherency problem?

> +       return igt_gpu_fill_dw(ce, vma, dword * sizeof(u32),
> +                              vma->size >> PAGE_SHIFT, value);
> +}


More information about the Intel-gfx mailing list