Re: [PATCH i-g-t] i915/gem_ctx_engine: Skip redundant clear of a fresh buffer

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

 




> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Chris
> Wilson
> Sent: Tuesday, January 7, 2020 7:29 PM
> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: igt-dev@xxxxxxxxxxxxxxxxxxxxx
> Subject:  [PATCH i-g-t] i915/gem_ctx_engine: Skip redundant clear of
> a fresh buffer
> 
> No need to memset(0) the mapping of a fresh buffer, as we expect it to
> be 0 already.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> ---
>  tests/i915/gem_ctx_engines.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tests/i915/gem_ctx_engines.c b/tests/i915/gem_ctx_engines.c
> index 55794a438..86c4bea5a 100644
> --- a/tests/i915/gem_ctx_engines.c
> +++ b/tests/i915/gem_ctx_engines.c
> @@ -454,7 +454,6 @@ static void independent(int i915)
>  	map = gem_mmap__cpu(i915, results.handle, 0, 4096, PROT_READ);
>  	gem_set_domain(i915, results.handle,
>  		       I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
> -	memset(map, 0, 4096);

Reviewed-by: Chuansheng Liu <chuansheng.liu@xxxxxxxxx>

This patch can fix the problem of memsetting read-only map memory.
Just curious when it can get merged?
Thanks.

_______________________________________________
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