Coelacanth's Dream

GPU と Media Engine が別々のタイルに搭載される Meteor Lake

Intel のソフトウェアエンジニア Matt Roper 氏により、Linux Kernel における Intel GPU/GFX ドライバー i915 に、Meteor Lake 向けた Standalone Media のサポートを追加するパッチが投稿されている。

Standalone Media Engine

Meteor Lake からメディア機能 (Media Engine, Xe-LPM+) はハードウェアレベルにおいて 2番目の GT に移行し、Standalone Media と呼ばれる。
GTGraphics Technology の略であり、Intel GPU/GFX ドライバーでは GPU 全体、あるいは GPUダイ/タイル単位で指す用語として使われている。

Standalone Media では独自の GuC (Graphics micro (µ) Controller)、電源管理、forcewake (強制起動?) を持ち、メインの GPUコア部とは分離されている。
従来の Intel GPU において Media Engine は、他の GPU ユニットと同じ GT 1基、GPUダイ/タイルに属していた。
こうした Media Engine とドライバー変更は Meteor Lake では SoC Tile に Media Engine が搭載されることが影響していると思われる。
Intel は 2022/08/21 - 2022/08/23 に開催された Hot Chips 34 にて、Meteor LakeArrow Lake に採用される Foveros パッケージング技術に関する発表を行っており、その中で Media Engine が GPU Tile ではなく SoC Tile に統合されることを示していた。

パッチ内で Matt Roper 氏は、Standalone MediaXe-HP SDVPonte Vecchioにおける remote tile(s) に多くの点で類似しており、コードのインフラも多くで共有できるとしている。
しかし重要な違いがいくつか存在し、パッチはそれに対応するためのものとなる。

 Starting with MTL, media functionality has moved into a new, second GT
 at the hardware level.  This new GT, referred to as "standalone media"
 in the spec, has its own GuC, power management/forcewake, etc.  The
 general non-engine GT registers for standalone media start at 0x380000,
 but otherwise use the same MMIO offsets as the primary GT.
	
 Standalone media has a lot of similarity to the remote tiles
 present on platforms like xehpsdv and pvc, and our i915 implementation
 can share much of the general "multi GT" infrastructure between the two
 types of platforms.  However there are a few notable differences
 we must deal with:

複数の GPU/Tile で構成される Xe-HP SDVPonte Vecchio といったプラットフォームをサポートするパッチは以前に投稿されており、CPU と接続されている GPU/Tile を primary/root とし、それを経由して他の GPU/Tile の初期化を実行する方法を取っていた。1

Standalone Media では、複数の GPU/Tile で構成されるプラットフォームとは異なり、primary GT を経由して割り込み処理が行われるとされている。
この点から、Meteor Lake では GPU と Media Engine が別々のタイルに搭載されるが、GPU が無効化された SKU では Media Engine も無効化されるものと思われる。
また、GPU が無効化されている場合は DeviceID からプラットフォームの検出ができないようにも思う。

  - Unlike platforms with remote tiles, all interrupt handling for
    standalone media still happens via the primary GT.

Standalone Media (Xe-LPM+)engine_mask を見ると VECS0, VCS0, VCS2 のビットフラグが有効化されている。
VCS はデコードエンジン (VDBox, BSD, Bit Stream Decode)、VCES はエンコードエンジン (VEBox, Video Enhancement Engine) を指し、エンジン数だけで言えば Tiger Lake, Alder Lake, DG1 と同規模となる。
DG2/Alchemist に採用されている Xe-HPM (ver12.50) は AV1エンコードをサポートしているが、Meteor Lake に採用される Xe-LPM+ (ver13.00) はまだ intel/media-driver 等へのパッチが公開されておらず、AV1エンコードのサポート状況については不明となっている。

 +static const struct intel_gt_definition xelpmp_extra_gt[] = {
 +	{
 +		.type = GT_MEDIA,
 +		.name = "Standalone Media GT",
 +		.setup = intel_sa_mediagt_setup,
 +		.gsi_offset = MTL_MEDIA_GSI_BASE,
 +		.engine_mask = BIT(VECS0) | BIT(VCS0) | BIT(VCS2),
 +	},
 +	{}
 +};
 +
Intel Media Engine VEBox VDBox
TGL/DG1/ADL 1 2
Xe-HP SDV 4? 4?
DG2/Alchemist 2? 2?
Meteor Lake 1? 2?

参考リンク