[PATCH i-g-t] tests/intel/xe_ccs: fix bo size for ccs

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Mon Mar 18 08:42:28 UTC 2024


Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>

On 15.3.2024 18.27, Matthew Auld wrote:
> Don't just assume it will always fit into the default page size. When
> passing in custom -W or -H the raw CCS size could be larger than BO,
> leading to assertions.
> 
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
>   tests/intel/xe_ccs.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/intel/xe_ccs.c b/tests/intel/xe_ccs.c
> index d6f5408a7..aec83a057 100644
> --- a/tests/intel/xe_ccs.c
> +++ b/tests/intel/xe_ccs.c
> @@ -108,7 +108,7 @@ static void surf_copy(int xe,
>   	const uint32_t bpp = 32;
>   	uint32_t bb1, bb2, ccs, ccs2, *ccsmap, *ccsmap2;
>   	uint64_t bb_size, ccssize = mid->size / CCS_RATIO(xe);
> -	uint64_t ccs_bo_size = xe_get_default_alignment(xe);
> +	uint64_t ccs_bo_size = ALIGN(ccssize, xe_get_default_alignment(xe));
>   	uint32_t *ccscopy;
>   	uint8_t uc_mocs = intel_get_uc_mocs_index(xe);
>   	uint32_t sysmem = system_memory(xe);



More information about the igt-dev mailing list