Multi-tile Devices

Different vendors use the term “tile” a bit differently, but in the Intelworld, a ‘tile’ is pretty close to what most people would think of as beinga complete GPU. When multiple GPUs are placed behind a single PCI device,that’s what is referred to as a “multi-tile device.” In such cases, prettymuch all hardware is replicated per-tile, although certain responsibilitieslike PCI communication, reporting of interrupts to the OS, etc. are handledsolely by the “root tile.” A multi-tile platform takes care of tying thetiles together in a way such that interrupt notifications from remote tilesare forwarded to the root tile, the per-tile vram is combined into a singleaddress space, etc.

In contrast, a “GT” (which officially stands for “Graphics Technology”) isthe subset of a GPU/tile that is responsible for implementing graphicsand/or media operations. The GT is where a lot of the driver implementationhappens since it’s where the hardware engines, the execution units, and theGuC all reside.

Historically most Intel devices were single-tile devices that contained asingle GT. PVC is an example of an Intel platform built on a multi-tiledesign (i.e., multiple GPUs behind a single PCI device); each PVC tile onlyhas a single GT. In contrast, platforms like MTL that have separate chipsfor render and media IP are still only a single logical GPU, but thegraphics and media IP blocks are each exposed as a separate GT within thatsingle GPU. This is important from a software perspective because multi-GTplatforms like MTL only replicate a subset of the GPU hardware and behavedifferently than multi-tile platforms like PVC where nearly everything isreplicated.

Per-tile functionality (shared by all GTs within the tile):
  • Complete 4MB MMIO space (containing SGunit/SoC registers, GTregisters, display registers, etc.)

  • Global GTT

  • VRAM (if discrete)

  • Interrupt flows

  • Migration context

  • kernel batchbuffer pool

  • Primary GT

  • Media GT (if media version >= 13)

Per-GT functionality:
  • GuC

  • Hardware engines

  • Programmable hardware units (subslices, EUs)

  • GSI subset of registers (multiple copies of these registers residewithin the complete MMIO space provided by the tile, but at differentoffsets --- 0 for render, 0x380000 for media)

  • Multicast register steering

  • TLBs to cache page table translations

  • Reset capability

  • Low-level power management (e.g., C6)

  • Clock frequency

  • MOCS and PAT programming

Internal API

intxe_tile_alloc(structxe_tile*tile)

Perform per-tile memory allocation

Parameters

structxe_tile*tile

Tile to perform allocations for

Description

Allocates various per-tile data structures using DRM-managed allocations.Does not touch the hardware.

Returns -ENOMEM if allocations fail, otherwise 0.

intxe_tile_alloc_vram(structxe_tile*tile)

Perform per-tile VRAM structs allocation

Parameters

structxe_tile*tile

Tile to perform allocations for

Description

Allocates VRAM per-tile data structures using DRM-managed allocations.Does not touch the hardware.

Returns -ENOMEM if allocations fail, otherwise 0.

intxe_tile_init_early(structxe_tile*tile,structxe_device*xe,u8id)

Initialize the tile and primary GT

Parameters

structxe_tile*tile

Tile to initialize

structxe_device*xe

Parent Xe device

u8id

Tile ID

Description

Initializes per-tile resources that don’t require any interactions with thehardware or any knowledge about the Graphics/Media IP version.

Return

0 on success, negative error code on error.

intxe_tile_init_noalloc(structxe_tile*tile)

Init tile up to the point where allocations can happen.

Parameters

structxe_tile*tile

The tile to initialize.

Description

This function prepares the tile to allow memory allocations to VRAM, but isnot allowed to allocate memory itself. This state is useful for displayreadout, because the inherited display framebuffer will otherwise beoverwritten as it is usually put at the start of VRAM.

Note that since this is tile initialization, it should not perform anyGT-specific operations, and thus does not need to hold GT forcewake.

Return

0 on success, negative error code on error.

structdrm_pagemap*xe_tile_local_pagemap(structxe_tile*tile)

Return a pointer to the tile’s local drm_pagemap if any

Parameters

structxe_tile*tile

The tile.

Return

A pointer to the tile’s local drm_pagemap, or NULL if local pagemapsupport has been compiled out.