[igt-dev] [PATCH i-g-t v2 1/2] lib/intel_bufops: Introduce buffer operations
Dixit, Ashutosh
ashutosh.dixit at intel.com
Tue Dec 10 00:07:37 UTC 2019
On Sun, 01 Dec 2019 11:09:41 -0800, Zbigniew Kempczyński wrote:
>
> Different GENs supports different tile surfaces. Older GENs
> have HW fences to allow X / Y surface tiling / detiling.
> Newer GENs have to tile / detile such surface in software.
>
> To make test developer life easier this code adds buffer
> operations (short bufops) to use appropriate functions allowing
> copying linear buffer to BO and from BO to linear buffer
> regardless GPU generation and tiling within BO. For GENs having
> fences support preference is to use them if they are available
> (X / Y tiling is probed on bufops initalization).
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Katarzyna Dec <katarzyna.dec at intel.com>
[snip]
> +/* Generations 9 - 11 */
> +{
> + .gen_start = 9,
> + .gen_end = 11,
> + .supported_tiles = TILE_NONE | TILE_X | TILE_Y | TILE_Yf,
> + .hw_tiles = TILE_X | TILE_Y,
> + .linear_to = copy_linear_to_cpu,
> + .linear_to_x = copy_linear_to_gtt,
> + .linear_to_y = copy_linear_to_gtt,
> + .linear_to_yf = copy_linear_to_yf,
> + .to_linear = copy_cpu_to_linear,
> + .x_to_linear = copy_gtt_to_linear,
> + .y_to_linear = copy_gtt_to_linear,
> + .yf_to_linear = copy_yf_to_linear,
> +},
> +/* Generation 12 */
> +{
> + .gen_start = 12,
> + .gen_end = 12,
> + .supported_tiles = TILE_NONE | TILE_X | TILE_Y | TILE_Yf | TILE_Ys,
> + .linear_to = copy_linear_to_wc,
> + .linear_to_x = copy_linear_to_x,
> + .linear_to_y = copy_linear_to_y,
> + .linear_to_yf = copy_linear_to_yf,
> + .linear_to_ys = NULL, /* to be implemented */
> + .to_linear = copy_wc_to_linear,
> + .x_to_linear = copy_x_to_linear,
> + .y_to_linear = copy_y_to_linear,
Isn't it true that TGL which is Gen12 does support HW fences in ggtt?
Maybe it is ok to leave the default functions as these but perhaps we
should set the ggtt versions of the functions (same ag Gen11 above) if HW
tiling support is detected in buf_ops_get()?
More information about the igt-dev
mailing list