[PATCH i-g-t] intel_compute: Use valid number of array size for unbind

Grzegorzek, Dominik dominik.grzegorzek at intel.com
Mon Nov 25 09:58:27 UTC 2024


On Fri, 2024-11-22 at 11:29 +0100, Zbigniew Kempczyński wrote:
> Due to copy-paste number of elements for unbind is wrong for xe2.
> Fix this as it should be paired with bind.
> 
> This is likely subject for refactor and use ARRAY_SIZE() but at the
> moment it's a quickfix. Luckily number or entries value was smaller
> than for bind so we didn't notice the failure, only there were some
> dangling vmas in the vm.
> 
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

Good spot. It is:
Reviewed-by: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> ---
>  lib/intel_compute.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/intel_compute.c b/lib/intel_compute.c
> index 3ab9ace793..879928ab64 100644
> --- a/lib/intel_compute.c
> +++ b/lib/intel_compute.c
> @@ -1406,7 +1406,7 @@ static void xe2lpg_compute_exec(int fd, const unsigned char *kernel,
>  		igt_assert(f1 == f2 * f2);
>  	}
>  
> -	bo_execenv_unbind(&execenv, bo_dict, XEHPC_BO_DICT_ENTRIES);
> +	bo_execenv_unbind(&execenv, bo_dict, XE2_BO_DICT_ENTRIES);
>  	bo_execenv_destroy(&execenv);
>  }
>  



More information about the igt-dev mailing list