[igt-dev] [PATCH i-g-t v3 14/15] tests/i915/gem_ppgtt: make copying more readable

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Fri Oct 23 08:23:14 UTC 2020


On Fri, Oct 02, 2020 at 08:54:41AM +0200, Dominik Grzegorzek wrote:
> Use intel_bb_copy_intel_buf instead of intel_bb_blit_copy
> to make the code simplier.
> 
> Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  tests/i915/gem_ppgtt.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)

Looks ok. 

Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

> 
> diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
> index 73bd19c5..73d13fe7 100644
> --- a/tests/i915/gem_ppgtt.c
> +++ b/tests/i915/gem_ppgtt.c
> @@ -166,12 +166,8 @@ static void fork_bcs_copy(int timeout, uint32_t final,
>  			src[1] = create_bo(dst[child]->bops,
>  					   i++ | child << 16);
>  
> -			intel_bb_blt_copy(ibb, src[1], 0, 0, 4096,
> -					  src[0], 0, 0, 4096,
> -					  4096/4, SIZE/4096, 32);
> -			intel_bb_blt_copy(ibb, src[0], 0, 0, 4096,
> -					  dst[child], 0, 0, 4096,
> -					  4096/4, SIZE/4096, 32);
> +			intel_bb_copy_intel_buf(ibb, src[1], src[0], SIZE);
> +			intel_bb_copy_intel_buf(ibb, src[0], dst[child], SIZE);
>  
>  			intel_buf_destroy(src[1]);
>  			intel_buf_destroy(src[0]);
> @@ -181,12 +177,8 @@ static void fork_bcs_copy(int timeout, uint32_t final,
>  		src[1] = create_bo(dst[child]->bops,
>  				   final | child << 16);
>  
> -		intel_bb_blt_copy(ibb, src[1], 0, 0, 4096,
> -				  src[0], 0, 0, 4096,
> -				  4096/4, SIZE/4096, 32);
> -		intel_bb_blt_copy(ibb, src[0], 0, 0, 4096,
> -				  dst[child], 0, 0, 4096,
> -				  4096/4, SIZE/4096, 32);
> +		intel_bb_copy_intel_buf(ibb, src[1], src[0], SIZE);
> +		intel_bb_copy_intel_buf(ibb, src[0], dst[child], SIZE);
>  
>  		intel_buf_destroy(src[1]);
>  		intel_buf_destroy(src[0]);
> -- 
> 2.20.1
> 


More information about the igt-dev mailing list