[Intel-gfx] [PATCH i-g-t v3 7/7] tests/kms_ccs: Test case for wrong aux buffer stripe size

Daniel Stone daniel at fooishbar.org
Tue Sep 5 08:03:21 UTC 2017


Hi Gabriel,

On 31 August 2017 at 07:18, Gabriel Krisman Bertazi
<krisman at collabora.co.uk> wrote:
> Two scenarios tested:
>   - unaligned stripe
>   - Stripe too small

'stride' in the commit message please. ;) But it is fine everywhere
through the code.

> @@ -323,7 +326,14 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
>                  */
>                 int ccs_width = ALIGN(width * 4, 32) / 32;
>                 int ccs_height = ALIGN(height, 16) / 16;
> -               f.pitches[1] = ALIGN(ccs_width * 1, 128);
> +               int aux_stride = ALIGN(ccs_width * 1, 128);
> +
> +               if (fb_flags & FB_MISALIGN_AUX_STRIDE)
> +                       aux_stride = ccs_width;

aux_stride -= 64 perhaps?

> +               else if (fb_flags & FB_SMALL_AUX_STRIDE)
> +                       aux_stride = ALIGN(ccs_width/2, 128);

This one seems OK, but maybe want to skip it in the unlikely case that
(w <= 1024), since that already has the smallest possible valid stride
at 128.

Cheers,
Daniel


More information about the Intel-gfx mailing list