[igt-dev] [PATCH i-g-t v3 1/7] lib/intel_bufops: Add bufops reference and relaxate stride requirement

Chris Wilson chris at chris-wilson.co.uk
Mon May 18 09:56:39 UTC 2020


Quoting Zbigniew Kempczyński (2020-05-18 10:09:13)
> @@ -721,7 +724,10 @@ static void __intel_buf_init(struct buf_ops *bops,
>                 size = buf->aux.offset + aux_width * aux_height;
>  
>         } else {
> -               buf->stride = ALIGN(width * (bpp / 8), 128);
> +               if (buf->tiling)
> +                       buf->stride = ALIGN(width * (bpp / 8), 128);

128 is for y-tiling, 512 for x-tiling; and of course older gen varies.

if (tiling) {
	if (gen < 3)
		tile_width = 128;
	else if (IS_ALV || IS_GDG || tiling == X)
		tile_width = 512;
	else
		tile_width = 128;
}

So if you need a work anywhere value, 512.
-Chris


More information about the igt-dev mailing list