[PATCH i-g-t 4/5] lib/igt_fb: use xe_bb_size() helper

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu Jan 25 06:12:56 UTC 2024


On Wed, Jan 24, 2024 at 06:07:12PM +0000, Matthew Auld wrote:
> No need to open code this anymore.
> 
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> ---
>  lib/igt_fb.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 2cf94013e..71c220a08 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -2906,8 +2906,7 @@ static void blitcopy(const struct igt_fb *dst_fb,
>  						 INTEL_ALLOCATOR_SIMPLE,
>  						 ALLOC_STRATEGY_LOW_TO_HIGH, 0);
>  
> -		bb_size = ALIGN(bb_size + xe_cs_prefetch_size(dst_fb->fd),
> -				xe_get_default_alignment(dst_fb->fd));
> +		bb_size = xe_bb_size(dst_fb->fd, bb_size);
>  		xe_bb = xe_bo_create(dst_fb->fd, 0, bb_size, mem_region, 0);
>  	}
>  
> -- 
> 2.43.0
>

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

--
Zbigniew


More information about the igt-dev mailing list