You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BACKPORT: FROMLIST: drm/xe/guc: use SZ_4K for alignment
Per the "Firmware" chapter in "drm/xe Intel GFX Driver", as well as
"Volume 8: Command Stream Programming" in "Intel® Arc™ A-Series Graphics
and Intel Data Center GPU Flex Series Open-Source Programmer's Reference
Manual For the discrete GPUs code named "Alchemist" and "Arctic Sound-M""
and "Intel® Iris® Xe MAX Graphics Open Source Programmer's Reference
Manual For the 2020 Discrete GPU formerly named "DG1"":
"The RINGBUF register sets (defined in Memory Interface Registers) are
used to specify the ring buffer memory areas. The ring buffer must start
on a 4KB boundary and be allocated in linear memory. The length of any
one ring buffer is limited to 2MB."
The Graphics micro (μ) Controller (GuC) really expects command buffers
aligned to 4K boundaries.
Current code uses `PAGE_SIZE' as an assumed alignment reference but 4K
kernel page sizes is by no means a guarantee. On 16K-paged kernels, this
causes driver failures after loading the GuC firmware:
[ 7.398317] xe 0000:09:00.0: [drm] Found dg2/g10 (device ID 56a1) display version 13.00 stepping C0
[ 7.410429] xe 0000:09:00.0: [drm] Using GuC firmware from i915/dg2_guc_70.bin version 70.36.0
[ 10.719989] xe 0000:09:00.0: [drm] *ERROR* GT0: load failed: status = 0x800001EC, time = 3297ms, freq = 2400MHz (req 2400MHz), done = 0
[ 10.732106] xe 0000:09:00.0: [drm] *ERROR* GT0: load failed: status: Reset = 0, BootROM = 0x76, UKernel = 0x01, MIA = 0x00, Auth = 0x02
[ 10.744214] xe 0000:09:00.0: [drm] *ERROR* CRITICAL: Xe has declared device 0000:09:00.0 as wedged.
Please file a _new_ bug report at https://gitlab.freedesktop.org/drm/xe/kernel/issues/new
[ 10.828908] xe 0000:09:00.0: [drm] *ERROR* GT0: GuC mmio request 0x4100: no reply 0x4100
Correct this by revising all instances of `PAGE_SIZE' to `SZ_4K' and
revise `PAGE_ALIGN()' calls to `ALIGN()' with `SZ_4K' as the second
argument (overriding `PAGE_SIZE').
Cc: [email protected]
Fixes: 84d15f4 ("drm/xe/guc: Add capture size check in GuC log buffer")
Fixes: 9c8c7a7 ("drm/xe/guc: Prepare GuC register list and update ADS size for error capture")
Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Tested-by: Mingcong Bai <[email protected]>
Tested-by: Haien Liang <[email protected]>
Tested-by: Shirong Liu <[email protected]>
Tested-by: Haofeng Wu <[email protected]>
Link: FanFansfan@22c55ab
Co-developed-by: Shang Yatsen <[email protected]>
Signed-off-by: Shang Yatsen <[email protected]>
Co-developed-by: Kexy Biscuit <[email protected]>
Signed-off-by: Kexy Biscuit <[email protected]>
Signed-off-by: Mingcong Bai <[email protected]>
Reviewed-by: Matthew Brost <[email protected]>
[Mingcong Bai: Resolved a minor merge conflict post-6.16 in
drivers/gpu/drm/xe/xe_guc_ads.c]
[Mingcong Bai: Resolved a minor merge conflict since 6.18 in
drivers/gpu/drm/xe/xe_guc.c.]
Link: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Mingcong Bai <[email protected]>
0 commit comments