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

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon Nov 25 13:36:36 UTC 2024


Hi Zbigniew,
On 2024-11-22 at 11:29:31 +0100, Zbigniew Kempczyński wrote:

small nit about subject, please add 'lib/' prefix so:

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

Regards,
Kamil

> 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>
> ---
>  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);
>  }
>  
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list