[igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_exec_flush: Require mapapble aperture when needed

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 29 21:13:46 UTC 2020


Quoting Antonio Argenziano (2020-01-29 19:29:14)
> The test goes through multiple mapping so require mappable aperture when
> going through GTT. Also use any coherent mapping not just GTT.
> 
> Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
> ---
>  tests/i915/gem_exec_flush.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_exec_flush.c b/tests/i915/gem_exec_flush.c
> index 28708460..778bc18c 100644
> --- a/tests/i915/gem_exec_flush.c
> +++ b/tests/i915/gem_exec_flush.c
> @@ -152,9 +152,10 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
>                                I915_GEM_DOMAIN_WC,
>                                I915_GEM_DOMAIN_WC);
>  
> -               /* Prepara a mappable binding to prevent pread mighrating */
> +               /* Prepare a mappable binding to prevent pread migrating */
>                 if (!snoop) {
> -                       ptr = gem_mmap__gtt(fd, obj[0].handle, 4096, PROT_READ);
> +                       ptr = gem_mmap__device_coherent(fd, obj[0].handle, 0,
> +                                                       4096, PROT_READ);
>                         igt_assert_eq_u32(ptr[0], 0xabcdabcd);
>                         munmap(ptr, 4096);
>                 }

Yeah, this is outdated and doesn't do much for the kernel anymore.

Still no harm. And who knows the weirdness may trip a bug.
-Chris


More information about the igt-dev mailing list