[igt-dev] [PATCH i-g-t 1/2] tests/i915/gem_madvise: Use gem_mmap__device_coherent
Chris Wilson
chris at chris-wilson.co.uk
Thu Jan 30 01:38:39 UTC 2020
Quoting Vinay Belgaumkar (2020-01-30 01:23:57)
> Allow test to run on platforms without aperture as well.
>
> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
> Cc: Antonio Argenziano <antonio.argenziano at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> tests/i915/gem_madvise.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/i915/gem_madvise.c b/tests/i915/gem_madvise.c
> index 7162a5c3..56ce91cb 100644
> --- a/tests/i915/gem_madvise.c
> +++ b/tests/i915/gem_madvise.c
> @@ -63,7 +63,7 @@ dontneed_before_mmap(void)
>
> handle = gem_create(fd, OBJECT_SIZE);
> gem_madvise(fd, handle, I915_MADV_DONTNEED);
> - ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE);
> + ptr = gem_mmap__device_coherent(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE);
Tricky, this does not work with gem_mmap__wc... Maybe pretend it should.
-Chris
More information about the igt-dev
mailing list