[PATCH 2/6] drm/format-helper: Add KUnit tests for drm_fb_swab()

André Almeida andrealmeid at riseup.net
Wed Aug 9 14:57:18 UTC 2023


Em 21/07/2023 15:23, Arthur Grillo escreveu:
> Insert parameterized test for the drm_fb_swab() to ensure correctness
> and prevent future regressions.
> 
> Signed-off-by: Arthur Grillo <arthurgrillo at riseup.net>
> ---

[...]

> +			.dst_pitch =  TEST_USE_DEFAULT_PITCH,
> +			.expected = {
> +				0xFFFFFF11, 0x00000022,
> +				0x0000FF33, 0x00FF0044,
> +				0xFF000055, 0xFF00FF66,
> +				0x00FFFF77, 0xFFFF0088,
> +			},
> +		},
>   	},
>   	{
>   		/* Randomly picked colors. Full buffer within the clip area. */
> @@ -425,6 +448,14 @@ static struct convert_xrgb8888_case convert_xrgb8888_cases[] = {
>   				0b010, 0b000,
>   			},
>   		},
> +		.swab_result = {
> +			.dst_pitch =  20,
> +			.expected = {
> +				0x9C440EA1, 0x054D11B1, 0x03F3A8C1, 0x00000000, 0x00000000,
> +				0x73F06CD1, 0x9C440EA2, 0x054D11B2, 0x00000000, 0x00000000,
> +				0x0303A8C2, 0x73F06CD2, 0x9C440EA3, 0x00000000, 0x00000000,

I would appreciated to have some information about those numbers in the 
commit message.


More information about the dri-devel mailing list