Re: [PATCH i-g-t] tests/gem_exec_gttfill: MMAP_OFFSET related refresh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2020-03-05 at 18:53 +0100, Janusz Krzysztofik wrote:
> The test already tried to use a working mapping by first trying legacy
> WC, then GTT.  Use gem_mmap__device_coherent() helper instead of
> approaching its implementation locally.
> 
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@xxxxxxxxxxxxxxx>

Please ignore this submission, an equivalent implementation has been
just merged.

Thanks,
Janusz

> ---
>  tests/i915/gem_exec_gttfill.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
> index f810dafd1..27277df48 100644
> --- a/tests/i915/gem_exec_gttfill.c
> +++ b/tests/i915/gem_exec_gttfill.c
> @@ -155,15 +155,10 @@ static void fillgtt(int fd, unsigned ring, int timeout)
>  	igt_assert(batches);
>  	for (unsigned i = 0; i < count; i++) {
>  		batches[i].handle = gem_create(fd, BATCH_SIZE);
> -		batches[i].ptr =
> -			__gem_mmap__wc(fd, batches[i].handle,
> -				       0, BATCH_SIZE, PROT_WRITE);
> -		if (!batches[i].ptr) {
> -			batches[i].ptr =
> -				__gem_mmap__gtt(fd, batches[i].handle,
> -						BATCH_SIZE, PROT_WRITE);
> -		}
> -		igt_require(batches[i].ptr);
> +		batches[i].ptr = gem_mmap__device_coherent(fd,
> +							   batches[i].handle, 0,
> +							   BATCH_SIZE,
> +							   PROT_WRITE);
>  	}
>  
>  	/* Flush all memory before we start the timer */

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux